bennyyip [Tue, 24 Feb 2026 21:13:40 +0000 (21:13 +0000)]
patch 9.2.0048: MS-Windows: ConPTY not yet preferred
Problem: MS-Windows: ConPTY not yet preferred
Solution: Mark ConPTY as stable starting with Windows 11 (build 22000).
Vim will now prefer ConPTY over winpty on these systems.
fixes: #19033
closes: #19037
Signed-off-by: bennyyip <yebenmy@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(sshconfig): Add 3 additional keywords to syntax script
closes: #19488
Signed-off-by: James Roberts-Thomson <jamesrt@gmail.com> Signed-off-by: Jakub Jelen <jakuje@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aliaksei Budavei [Sun, 22 Feb 2026 18:58:37 +0000 (18:58 +0000)]
tests(commondumps): Make mark-line-related optimisations
- Generate once (and inline) all alphabetical mark names.
- Allocate all markable "setpos" lists in advance.
- Continue tolerating redundant "setpos" calls that reset
mark "`" for motions within a line or motions between
paired lines (i.e. the lines for which mark "`" is made
reciprocal) rather than making "getpos" calls that check
the position of mark "`" before conditionally changing it
with "setpos" since checking a mark position is slower
than setting it according to profiling samples.
- Observe sparing use of empty lines.
closes: #19476
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Sat, 21 Feb 2026 17:53:06 +0000 (17:53 +0000)]
patch 9.2.0043: crypt: Crash when reading an encrypted UTF-8 file
Problem: crypt: Crash when reading an encrypted UTF-8 file.
This happens because readfile() does not account for leftover
conversion bytes (conv_restlen) when reallocating and moving
the buffer after decryption (smss2022).
Solution: Include conv_restlen in the offset calculations and memmove
operations within readfile() (Foxe Chen).
fixes: #19425
closes: #19453
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
John Marriott [Sat, 21 Feb 2026 17:24:47 +0000 (17:24 +0000)]
patch 9.2.0041: Not always using GA_CONCAT_LITERAL
Problem: Not always using GA_CONCAT_LITERAL with string literals.
(after: v9.2.0031)
Solution: Use the GA_CONCAT_LITERAL, instead of ga_concat_len.
(John Marriott)
closes: #19468
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0039: potential integer underflow in screen_line()
Problem: In screen_line(), there is a potential integer underflow when
accessing ScreenAttrs[off_to - 1] if off_to is zero.
(Coverity CID 1681430, after v9.2.0017)
Solution: Add a check to ensure off_to > 0 before accessing the
previous attribute index.
patch 9.2.0035: syntax highlighting lost in popup with opacity
Problem: syntax highlighting lost in popup with opacity lower than 100
(after v9.2.0017)
Solution: Before blending, combine the popup's window color attribute
with the character's own attribute using hl_combine_attr()
(Yasuhiro Matsumoto).
related: #19272
closes: #19478
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
DuckAfire [Thu, 19 Feb 2026 18:04:46 +0000 (18:04 +0000)]
patch 9.2.0033: filetype: sh filetype used for env files
Problem: filetype: sh filetype used for env files
Solution: Detect *.env and .env.* files as env filetype,
detect .envrc and .envrc.* as sh filetype,
include a simple env syntax script (DuckAfire)
Previously, .env files were handled by the shell syntax. While
functional, this limited the ability to support specific .env
implementations, such as CodeIgniter4 which allows dots in keys
(e.g., "foo.bar=0").
The new dedicated 'env' filetype and syntax script improves legibility
and prevents highlighting from breaking when encountering spaces.
Currently, the syntax does not support indentation; fields, variables,
and comments must start at the beginning of the line.
closes: #19260
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: DuckAfire <155199080+duckafire@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Hirohito Higashi [Thu, 19 Feb 2026 17:35:55 +0000 (17:35 +0000)]
patch 9.2.0032: completion: hang with line completion and fuzzy
Problem: completion: hang with line completion and fuzzy (Jesse Pavel)
Solution: Only check the line number when wrapping around the file
(Hirohito Higashi).
fixes: #19434
closes: #19443
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Hirohito Higashi [Thu, 19 Feb 2026 17:06:43 +0000 (17:06 +0000)]
patch 9.2.0030: completion: non-prefix matches shown when leader is NULL
Problem: When 'autocomplete' fires before compl_leader is initialized,
the prefix filter is bypassed. This allows non-prefix matches
(e.g. from fuzzy omnifuncs) to be shown in the popup menu and
incorrectly preinserted.
Solution: In get_leader_for_startcol(), if compl_leader.string is NULL,
fall back to using compl_orig_text as a filter for matches
starting at or after the completion column (Hirohito Higashi).
When 'autocomplete' first fires, compl_leader is NULL because
ins_compl_start() has not set it yet. This caused the prefix filter in
ins_compl_build_pum(), find_next_completion_match() and
find_common_prefix() to be bypassed, allowing non-prefix fuzzy omnifunc
matches to appear in the PUM and be preinserted.
Extend get_leader_for_startcol() to fall back to compl_orig_text when
compl_leader.string is NULL: if the match's cpt source startcol is less
than compl_col the match includes pre-compl_col text, so return
&compl_leader (NULL string) to signal "pass through"; otherwise return
&compl_orig_text so callers filter by the original text. The compl_col
<= 0 guard is kept only for the prepend-text path to avoid it
interfering with the NULL-leader fallback when compl_col is zero.
With this change all callers of get_leader_for_startcol() automatically
receive the correct filter string without additional helpers.
Also update Test_autocomplete_trigger Test 9 to reflect the new
behavior: 'faberge' is no longer shown when completing 'foo' because
it does not start with the current prefix.
Add Test_autocomplete_preinsert_null_leader() to verify that only
prefix-matching candidates appear in the PUM and are preinserted.
fixes: #19328
closes: #19447
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Daniel Smith [Thu, 19 Feb 2026 16:44:45 +0000 (16:44 +0000)]
runtime(progress): Use setlocal for expandtab
The Progress syntax file gained `set expandtab` in 4c3f536f4 (updated
for version 7.0d01, 2006-04-11). The Progress language itself doesn't
distinguish between tabs and spaces for indentation, so this seems like
something that should be left to user preference; but the setting is
accompanied by the comment "The Progress editor doesn't cope with tabs
very well", so there may be reason to keep it.
However, using `set` means that any new buffers created after editing a
Progress file will also have `expandtab` turned on, which is likely
contrary to a user's expectations. We should use `setlocal` instead to
avoid this.
closes: #19458
Signed-off-by: Daniel Smith <daniel@rdnlsmith.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Shane Harper [Wed, 18 Feb 2026 22:28:21 +0000 (22:28 +0000)]
runtime(less.sh): Fix reading from stdin.
Problem: less.sh can't read from stdin; it will try to read from a file named "-" instead (after 515da6ecdb).
Solution: Do not prepend "-" with "--" in the arguments list for vim.
The following were checked manually and worked as expected:
echo Test | less.sh
echo Test | less.sh -
less.sh some_file
less.sh --cmd some_file # vim will try to load "--cmd" and "some_file".
less.sh # script outputs "No input."
# All of the above repeated with the output piped to 'cat'.
closes: #19462
Signed-off-by: Shane Harper <shane@shaneharper.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: cshtml incorrectly recognized, razor files are not
recognized
Solution: Detect *.cshtml and *.razor files as razor filetype
(tris203)
patch 9.2.0024: Reading files with very long lines crashes with a segfault
Problem: Reading files with lines approaching MAXCOL length crashes
with segfault due to colnr_T overflow.
Solution: The split check 'linerest >= MAXCOL' fired too late because
linerest could grow by up to 'size' bytes before the next
check. Change threshold to 'linerest >= MAXCOL - size' to
ensure the line passed to ml_append() stays within colnr_T
range.
patch 9.2.0023: fix integer overflow in ml_append_int() for long lines
Problem: ml_append_int() crashes when appending lines near MAXCOL
length due to signed integer overflow in space_needed
calculation.
Solution: Change 'space_needed' from int to long to handle the
'len + INDEX_SIZE' computation without overflow. Update
db_free comparison casts from (int) to (long) to match.
zeertzjq [Wed, 18 Feb 2026 21:42:25 +0000 (21:42 +0000)]
patch 9.2.0022: bt_quickfix() is slow
Problem: In order to prevent a use-after-free, bt_quickfix() added a
call to buf_valid(), which slows it down, because Vim has to
loop through many buffers all the time (v9.0.1859)
Solution: Patch v9.0.2010 fixed a similar problem, so that the call to
buf_valid() is no longer required (zeertzjq)
fixes: #19169
closes: #19183
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
thinca [Wed, 18 Feb 2026 21:34:57 +0000 (21:34 +0000)]
patch 9.2.0021: channel: connection timeout fails to fall back to IPv4
Problem: When ch_open() tries to connect to a hostname that resolves to
multiple addresses (e.g., both IPv6 and IPv4), it uses a
single waittime for all connection attempts. If the first IPv6
connection attempt times out, it consumes almost all of the
waittime, leaving insufficient time (often just 1ms) for the
IPv4 attempt to succeed. (reporter)
Solution: Implement a simplified version of Happy Eyeballs (RFC 8305) to
improve connection fallback behavior when IPv6 is unavailable
or slow (thinca).
Distribute the waittime across multiple addresses:
- First address: use up to 250ms (RFC 8305 Connection Attempt Delay) or
half of the total waittime, whichever is smaller
- Middle addresses: divide remaining time equally
- Last address: use all remaining time
This ensures that IPv4 fallback has sufficient time to succeed even when
IPv6 connection attempts fail or timeout.
closes: #19233
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: thinca <thinca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aliaksei Budavei [Wed, 18 Feb 2026 18:35:26 +0000 (18:35 +0000)]
runtime(syntax-tests): Fail when executable syntax tests are found
The input files with syntax test cases are never compiled or
interpreted on behalf of test runners, just read, and their
parts are rendered in accordance with syntax definitions for
associated languages, to be compared with previously vetted
renderings. Whether their arbitrary contents will be valid
programs, benign programs, etc., is left for test authors to
decide and verify in their own environments. As executable
and non-executable files equally qualify for testing and yet
executability is never exercised, and since maintaining
executable files turns out to be a short-lived exception
than common practice, let us persist in keeping syntax files
non-executable and enforce it with a CI check.
closes: #19433
Co-authored-by: Christian Brabandt <cb@256bit.org> Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0017: popup: cannot allow to specify transparency
Problem: popup: Popup windows do not support a transparency setting.
Solution: Add the "opacity" option to popup windows to support
transparency when using the GUI or 'termguicolors'
(Yasuhiro Matsumoto).
closes: #19272
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0016: popup border not redrawn correctly with wide chars
Problem: When a popup window's border overwrites part of a wide
character from another popup, the remaining half loses its
original attribute (background color) because it is reset to 0.
Solution: Modify screen_line(), screen_puts_len(), and screen_fill() to
preserve the existing ScreenAttrs value when clearing wide
character boundaries. Also ensure background data is refreshed
for transparent popup cells (Yasuhiro Matsumoto).
closes: #19299
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Foxe Chen [Mon, 16 Feb 2026 22:26:57 +0000 (22:26 +0000)]
patch 9.2.0015: Vim gets confused by OSC handling
Problem: Vim gets confused by OSC handling, causing Vim to start in
search mode (Shane Harper, after v9.1.1703)
Solution: In handle_mapping(), check if we are handling OSC sequences
and if yes go straight to check_termcode() (Foxe Chen)
fixes: #19426
closes: #19435
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Stop mentioning "home directory" in the rtp search locations 1. and 5.,
which is incorrect in case of XDG scheme. $MYVIMDIR is correct, so use
this instead.
closes: #19438
Signed-off-by: Andrey Butirsky <butirsky@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0014: unsafe string functions may lead to buffer overflows
Problem: Unsafe string functions may lead to buffer overflows
Solution: Use vim_strncpy() instead of strpcy(), replace sprintf() by
vim_snprintf() (Yasuhiro Matsumoto)
closes: #19412
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Jan Palus [Mon, 16 Feb 2026 21:46:27 +0000 (21:46 +0000)]
patch 9.2.0013: parallel make invocation may break Wayland header generation
Problem: parallel make invocation may break Wayland header generation
Solution: Use single make target to generate Wayland protocol files.
(Jan Palus)
$(WAYLAND_SRC) contains up to 4 files which, given right timing and
parallelization level, can spawn 4 independent `make` processes during
parallel build. Each process generates same set of files intermittently
leading to inconsistent results. Instead use one common target each
source file depends on.
fixes: #19419
closes: #19420
Signed-off-by: Jan Palus <jpalus@fastmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0010: Using Wayland compositor is still slow
Problem: Using the Wayland backend in GTK, rendering remains slow due
to per-line redraws, unnecessary Cairo push/pop groups, and
scroll operations that allocate new surfaces repeatedly.
Solution: Improve rendering performance (Christoffer Aasted).
This commit does the following:
- Add gui.is_wayland to detect Wayland backend
- Avoid blocking the input loop
- Skip early redraws; let the compositor handle full-screen redraws
- Use CAIRO_OPERATOR_SOURCE to overwrite instead of blend
- Reuse scroll source region for destination scroll region
- Optimize fast scroll-up
- Remove cairo_push_group/pop_group and cairo_clip in scroll path
to reduce allocations (~50MB saved on 4K fractional scale)
Since Wayland redraws the entire screen between updates (unlike X11),
further performance gains are possible by batching drawing in other code
paths, e.g.:
- message.c: batch lines to avoid scroll
- term.c: batch terminal redraws
These could be refactored later to deferred redraw with Wayland.
closes: #19062
Signed-off-by: Christoffer Aasted <dezzadk@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0009: tests: test_cindent are not ordered
Problem: tests: the tests test_cindent_* functions were numbered
inconsistently, causing them to be executed in wrong order.
Solution: Rename the test_cindent functions with zero-padded numbers.
Char [Sun, 15 Feb 2026 16:27:52 +0000 (16:27 +0000)]
patch 9.2.0008: MS-Windows: font size calculation may be wrong
Problem: MS-Windows: font size calculation may be wrong when font does
not specify a valid ascent value. (Char, after v9.1.2129)
Solution: Calculate ascent as a ratio of ascent to total font height
with a fallback if metrics are zero.
Fallback to default value when font does not specify ascent value.
As proposed in https://github.com/vim/vim/pull/19318#issuecomment-3864669253
related: #19318
closes: #19367
Signed-off-by: Char <peacech@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Anttoni Erkkilä [Sun, 15 Feb 2026 16:21:15 +0000 (16:21 +0000)]
patch 9.2.0007: cindent: recognizing labels within commented lines
Problem: Comment lines which start like a label are recognized as a
label and indented based on that.
Solution: Check if the position is in a comment after recognizing a label
in cin_islabel (Anttoni Erkkilä)
closes: #19397
Signed-off-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Peter Lustig [Sun, 15 Feb 2026 16:14:11 +0000 (16:14 +0000)]
patch 9.2.0006: powershell commands wrongly wrapped when executed
Problem: powershell commands wrongly wrapped when executed
Solution: Use &{ ... } to wrap commands when powershell/pwsh is in use
(Peter Lustig).
Allow compound commands with 'system()' when 'shell' is 'pwsh'
When the 'shell' option was set to 'powershell' or 'pwsh' and the
'system()' vimscript function was called with an argument containing two
or more shell commands (delimited by ';' or '&'), the function would
always fail with 'E282'.
The cause of the error was that VIM would wrap the shell command string
with parentheses (to allow the entire output to be redirected to a
temporary file for capturing) before actually passing it to the
PowerShell process for execution.
Unlike the typical shell that uses parentheses to group commands (and
possibly spawn a subshell), PowerShell uses them to resolve a single
command (pipeline) to an expression. To group multiple commands with
PowerShell, you must instead wrap them with either the subexpression
operator '$(...)' or an immediately evaluated script block '& { ... }'.
The latter option may be more efficient since it does not buffer its
output like for the former one does.
closes: #19401
Signed-off-by: Peter Lustig <tiamatX18@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Bozhidar Batsov [Sun, 15 Feb 2026 14:53:55 +0000 (14:53 +0000)]
runtime(sh): fix spurious nextgroup=shComment on shEscape
Remove `nextgroup=shComment` from the `shEscape` syntax pattern.
This was causing `#` characters after escape sequences inside
double-quoted strings to be misinterpreted as comments, breaking
highlighting for the rest of the file.
Add a test case for escaped characters followed by # in double quotes.
fixes: #19053
closes: #19414
Signed-off-by: Bozhidar Batsov <bozhidar@batsov.dev> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_popup_setbuf fails, because the dump file contains
a reference to Vim version 9.1 (after v9.2.0000)
Solution: Replace Version number by 9.1 always.
patch 9.1.2148: [security]: Buffer overflow in netbeans interface
Problem: [security]: Buffer overflow in netbeans special_keys() handling
Solution: Limit writing to max KEYBUFLEN bytes to prevent writing out of
bounds.
Doug Kearns [Fri, 13 Feb 2026 16:05:17 +0000 (16:05 +0000)]
runtime(go,gleam): Remove 'formatprg' from ftplugins
Effective use of 'formatprg' requires both an understanding of the
specific capabilities of the formatting tool and Vim's formatting
commands. This is overly burdensome for some users.
Rather than address each complaint on a filetype by filetype basis,
remove 'formatprg' settings from all ftplugins.
It is expected that formatter plugins will be available in the near
future as a better solution. See #17145 (Add "formatter" feature using
"compiler" as a template).
Note: 'formatprg' will be removed from older ftplugins after the release
of Vim 9.2. The setting was added to the go and gleam ftplugins during
the current development cycle and have not been included in a Vim
release.
See: #18650 (rust.vim: stop setting formatprg to rustfmt)
closes: #19108
Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Bozhidar Batsov [Fri, 13 Feb 2026 15:49:02 +0000 (15:49 +0000)]
runtime(sudoers): highlight usernames with hyphens, digits, underscores
The username/group/netgroup patterns used \l\+ which only matched
lowercase letters. Linux usernames commonly contain hyphens, digits,
and underscores (e.g. www-data, deploy01, test_user).
Update the pattern to \l[-a-z0-9_]* to allow matching the additional
characters "-_" and numbers.
fixes: #18963
closes: #19396
Signed-off-by: Bozhidar Batsov <bozhidar@batsov.dev> Signed-off-by: Christian Brabandt <cb@256bit.org>
Julio B [Fri, 13 Feb 2026 07:50:52 +0000 (08:50 +0100)]
installman: Update the sed patterns in installman.sh
Problem: Installing man pages does not change the placeholder file paths
Solution: Update the sed patterns in installman.sh
Additionally we remove the sed command to update the path to the ps Vim
files for those reasons:
- All the postscript files were moved to the print/ subdirectory in
Commit e37d50a
- the sed command was wrongly quoting $vimloc so would wrongly try to
search for the literal value $vimloc instead of using the expanded
value.
Johnothan King [Thu, 12 Feb 2026 17:17:59 +0000 (18:17 +0100)]
runtime(sh): Fix some ksh-specific deficiencies in syntax script
- Amend syntax highlighting to allow for ksh93 discipline function names
(e.g. 'foo.get()') and mksh's odd function naming idiosyncrasies
(shNamespaceOne was introduced to enforce stricter naming rules for
ksh93 namespaces).
- Remove 'bind' from ksh93 syntax (such a builtin has never been
implemented in ksh93).
- 'xgrep' is only available in ksh93v- as an alternative way to
invoke the builtin 'grep -X', so reflect that in the syntax
highlighting.
- Forbid bash-style 'function name() {' syntax when highlighting
ksh88 and ksh93 scripts.
- Fix bug causing ' ()' to be incorrectly validated in mksh scripts.
- Add the many ksh93/ksh2020 .sh.* variables to the list of special
variables.
- Amend iskeyword to allow '.' so that '.sh.tilde.get' and such are
valid function names/variable names. (For mksh functions starting
with odd characters like '%' and '@' this would probably have too
many bad side effects, so I've omitted such a change for that shell.)
- Add new syntax tests and regenerate syntax dump files
closes: #19383
Signed-off-by: Johnothan King <johnothanking@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
We add new key exchange algorithms and new enums for PubkeyAuthOptions.
We also add new keywords from sshd_config.5 not present here and remove
keywords present here that are not present in the official
documentation, with the exception of those patched in by Debian and
Fedora, as well as ChallengeResponseAuthentication which is deprecated
but still functional.
closes: #19347
Signed-off-by: Fionn Fitzmaurice <git@fionn.computer> Signed-off-by: Jakub Jelen <jakuje@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>