patch 9.2.0104: popup: flickering on opaque popups with overlapping text
Problem: popup: flickering on opaque popups with overlapping text,
even if they are opaque (after v9.2.0016).
Solution: Prevent double redrawing by skipping background updates for
opaque popups. Revert changes to test dumps
(Javier Jaramago Fernández).
A flickering effect was introduced in commit v9.2.0016 (commit: 6c203072f) for all popups. This is a consequence of a double redraw of
the overlapping background characters. This could be expected for
transparent popups, but, it should exclude opaque ones. For a complete
fix of the flickering this commit is required in combination with fix
present in v9.2.0064 (commit: 97c5bed84b).
Additionally this commit reverts changes introduced for tests dumps for
masks in commits 6c203072f and cded5e220. These dumps were updated
preventing characters from popups to take into account the masks
specified for them. This forces the redraw of popup characters, even
when masks attempt to prevent them, leading to flickering effects. See
issues #19510 and PR: #19534.
closes: #19534
Signed-off-by: Javier Jaramago Fernández <jaramago.fernandez.javier@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Tue, 3 Mar 2026 20:08:12 +0000 (20:08 +0000)]
patch 9.2.0102: 'listchars' "leadtab" not used in :list
Problem: 'listchars' "leadtab" not used in :list (after 9.2.0088).
Solution: Also check for "leadtab" when using :list. Fix memory leak on
E1572 if "multispace" or "leadmultispace" is set (zeertzjq).
closes: #19557
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Wei Tang [Tue, 3 Mar 2026 19:50:15 +0000 (19:50 +0000)]
patch 9.2.0100: Using reserved keyword new as function argument
Problem: A recent commit introduced a new function named
`update_highlight_overrides()` in `highlight.pro` and
`highlight.c`, one of the parameter names conflicts with the C++
keyword `new`. This causes compilation issues on Windows when
VIM is compiled with OLE enabled, as "if_ole.cpp" cannot compile
due to the conflict (after v9.2.0093).
Solution: Rename the parameter name of `update_highlight_overrides()`
from new to hl_new (Wei Tang)
fixes: #19568
closes: #19558
Signed-off-by: Wei Tang <gauchyler@uestc.edu.cn> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0099: compiler warning about unused variable
Problem: Coverity complains about uninitialized var, also gcc warns
about a few other variables possibly being used uninitialized
(Tony Mechelynck, after v9.2.0093)
Solution: Initialize a few other variables.
patch 9.2.0098: Coverity: Error handling issue in win_init()
Problem: Coverity: error handling issues in win_init() (after
v9.2.0093)
Solution: Only call pop_highlight_overrides() when
push_highlight_overrides() was successful.
patch 9.2.0096: has() function is slow due to linear feature scan
Problem: The has() function is slow because it performs a linear scan
of the feature list for every call.
Solution: Move common runtime checks and the patch-version parser to the
beginning of the f_has() function (Yasuhiro Matsumoto).
closes: #19550
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
AstroSnail [Mon, 2 Mar 2026 20:06:48 +0000 (20:06 +0000)]
patch 9.2.0095: keypad keys may shadow normal keys
Problem: In XTerm, typing Home, End, PgUp or PgDn on the editing pad
will cause vim to recognize <kHome>, <kEnd>, <kPageUp> or
<kPageDown> (keypad keys) instead of <Home>, <End>, <PageUp>
or <PageDown> (editing pad keys) respectively, affecting
mappings and the :terminal. This is caused because the keypad
termcaps are sorted before the editing pad ones in
termcodes, meaning vim will match the former if they are the
same.
Solution: Only recognize keypad keys when nothing else matches
(AstroSnail).
fixes: #17331
closes: #19145
Signed-off-by: AstroSnail <astrosnail@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0094: popup: concealed text causes incorrect truncation
Problem: In popup windows, concealed characters and tab expansion
may cause wrong truncation for fixed width windows.
Solution: Do not adjust the screen column and bogus column counters
for popup windows when handling concealed text or extra
padding characters (Yasuhiro Matsumoto).
closes: #19121
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0092: control flow commands using '|' fail inside a {} block
Problem: inside_block() iterates through all cstack levels
and returns TRUE when a CSF_BLOCK frame is found. For control
flow commands this causes '|' to no longer be
recognised as a command separator, breaking
"try | silent cmd | catch | endtry" (Martin Tournoij, after
v9.2.0072).
Solution: Return FALSE from inside_block() for control flow commands
that handle '|' themselves, so they always use '|' as
separator regardless of block nesting.
- support `#=`
https://www.gnu.org/software/gettext/manual/html_node/PO-File-Format-Evolution.html
- add sticky flag support:
https://www.gnu.org/software/gettext/manual/html_node/Sticky-flags.html
closes: #19548
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Mon, 2 Mar 2026 18:18:51 +0000 (18:18 +0000)]
patch 9.2.0090: "leadtab" behavior inconsistent on line with only TABs
Problem: "leadtab" behavior inconsistent on line with only TABs
(after 9.2.0088).
Solution: Don't consider those as leading TABs. Also add more tests for
existing behavior of "lead" and "leadmultispace" (zeertzjq).
closes: #19549
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Miguel Barro [Sun, 1 Mar 2026 19:32:29 +0000 (19:32 +0000)]
patch 9.2.0089: netrw: does not take port into account in hostname validation
Problem: netrw: does not take port into account in hostname validation
(after v9.2.0073)
Solution: Update hostname validation check and test for an optional port
number (Miguel Barro)
closes: #19533
Signed-off-by: Miguel Barro <miguel.barro@live.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
mikoto2000 [Sun, 1 Mar 2026 19:23:34 +0000 (19:23 +0000)]
runtime(osc52): Omit paste from the osc52 provider when g:osc52_disable_paste is enabled
Omit paste capability from the osc52 provider when g:osc52_disable_paste
is enabled This avoids OSC 52 paste queries on unsupported terminals and
prevents the +/* registers from being treated as empty. Documentation
updated accordingly.
related: #18983
closes: #19542
Signed-off-by: mikoto2000 <mikoto2000@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
HarshK97 [Sun, 1 Mar 2026 17:50:27 +0000 (17:50 +0000)]
patch 9.2.0088: cannot display tabs for indentation
Problem: cannot display tabs for indentation
Solution: Add the "leadtab" value to the 'listchars' option to
distinguish between tabs used for indentation and tabs used
for alignment (HarshK97).
closes: #19094
Signed-off-by: HarshK97 <harshkapse1234@gmail.com> Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0087: popup: redrawing can be improved when moving popups
Problem: popup: redrawing can be improved when moving popups
Solution: When a pop-up window moves, only the target window should be
redrawn (Yasuhiro Matsumoto).
closes: #19536
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: There is a xkb syntax, but no filetype plugin.
Solution: Create a filetype plugin and set the comment and commentstring
options for the xkb filetype (xkb = X keyboard extension)
closes: #19537
Signed-off-by: GX <59413576+gx089@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Luuk van Baal [Sat, 28 Feb 2026 17:40:32 +0000 (17:40 +0000)]
patch 9.2.0081: Failed "z=" does not reset 'nospell' setting
Problem: When z= fails due to no word being found, 'spelllang' being
unset or a multiline visual selection, 'nospell' is not
restored.
Solution: Jump to where the user configured value of 'spell' is restored
instead of returning early (Luuk van Baal).
closes: #19525
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Popup windows leave ghost images when moved. Visual options
do not trigger a redraw when updated via popup_setoptions().
An empty borderhighlight list fails to clear existing
highlights.
Solution: Modify f_popup_move() in src/popupwin.c to save the old
position before moving and force a redraw. Enhance
f_popup_setoptions() to trigger a redraw when
visual-affecting options change. Modify
apply_general_options() to explicitly clear border
highlights when an empty list is provided
(Yasuhiro Matsumoto).
closes: #19297
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Doug Kearns [Sat, 28 Feb 2026 17:20:42 +0000 (17:20 +0000)]
runtime(vim): Update base syntax, improve :syntax group list arg matching
Attempt to match all variations of group name and comma separator across
continuation lines.
Fixes issues:
- #18491 (Two ")"s are incorrectly colored 'vimOperError' in
syntax/mail.vim), reported by @lkintact
- #19366 (highlight error for contains elements in a new line), reported
by Maxim Kim
fixes: #18491
fixes: #19366
Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0078: [security]: stack-buffer-overflow in build_stl_str_hl()
Problem: A stack-buffer-overflow occurs when rendering a statusline
with a multi-byte fill character on a very wide terminal.
The size check in build_stl_str_hl() uses the cell width
rather than the byte length, allowing the subsequent fill
loop to write beyond the 4096-byte MAXPATHL buffer
(ehdgks0627, un3xploitable).
Solution: Update the size check to account for the byte length of
the fill character (using MB_CHAR2LEN).
patch 9.2.0077: [security]: Crash when recovering a corrupted swap file
Problem: memline: a crafted swap files with bogus pe_page_count/pe_bnum
values could cause a multi-GB allocation via mf_get(), and
invalid pe_old_lnum/pe_line_count values could cause a SEGV
when passed to readfile() (ehdgks0627, un3xploitable)
Solution: Add bounds checks on pe_page_count and pe_bnum against
mf_blocknr_max before descending into the block tree, and
validate pe_old_lnum >= 1 and pe_line_count > 0 before calling
readfile().
patch 9.2.0076: [security]: buffer-overflow in terminal handling
Problem: When processing terminal output with many combining characters
from supplementary planes (4-byte UTF-8), a heap-buffer
overflow occurs. Additionally, the loop iterating over
cell characters can read past the end of the vterm array
(ehdgks0627, un3xploitable).
Solution: Use VTERM_MAX_CHARS_PER_CELL * 4 for ga_grow() to ensure
sufficient space. Add a boundary check to the character
loop to prevent index out-of-bounds access.
patch 9.2.0075: [security]: Buffer underflow with emacs tag file
Problem: When parsing a malformed Emacs-style tags file, a 1-byte
heap-buffer-underflow read occurs if the 0x7f delimiter
appears at the very beginning of a line. This happens
because the code attempts to scan backward for a tag
name from the delimiter without checking if space exists.
(ehdgks0627, un3xploitable)
Solution: Add a check to ensure the delimiter (p_7f) is not at the
start of the buffer (lbuf) before attempting to isolate
the tag name.
patch 9.2.0074: [security]: Crash with overlong emacs tag file
Problem: Crash with overlong emacs tag file, because of an OOB buffer
read (ehdgks0627, un3xploitable)
Solution: Check for end of buffer and return early.
patch 9.2.0073: [security]: possible command injection using netrw
Problem: [security]: Insufficient validation of hostname and port in
netrw URIs allows command injection via shell metacharacters
(ehdgks0627, un3xploitable).
Solution: Implement stricter RFC1123 hostname and IP validation.
Use shellescape() for the provided hostname and port.
Weixie Cui [Fri, 27 Feb 2026 19:09:34 +0000 (19:09 +0000)]
patch 9.2.0072: inside_block() uses wrong index in loop
Problem: inside_block() always checks the flags of the top-most stack
entry instead of the current loop index.
Solution: Use the loop index 'i' to check all levels of the condition
stack (Weixie Cui).
closes: #19524
Signed-off-by: Weixie Cui <cuiweixie@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Hirohito Higashi [Fri, 27 Feb 2026 19:03:18 +0000 (19:03 +0000)]
patch 9.2.0071: Vim9: lambda function deleted on re-sourcing
Problem: Vim9: lambda function deleted on re-sourcing
(Mao-Yining)
Solution: Use ISN_UCALL for script-local def calls inside a lambda
(Hirohito Higashi).
fixes: #19509
closes: #19519
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
snelling-a [Fri, 27 Feb 2026 18:51:34 +0000 (18:51 +0000)]
runtime(env): add ftplugin for env filetype
Patch 9.2.0033 (#19260) introduced a dedicated `env` filetype for
.env files, which were previously detected as `sh`. This left env
files without `commentstring`, `comments`, or `formatoptions` since
no ftplugin was added alongside the new filetype.
Add runtime/ftplugin/env.vim to set these options, matching the
behavior that .env files had when they used the `sh` filetype.
closes: #19522
Signed-off-by: snelling-a <72226000+snelling-a@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Fri, 27 Feb 2026 18:39:56 +0000 (18:39 +0000)]
patch 9.2.0069: highlight: incorrect string length and redundant code
Problem: The length passed to add_attr_and_value for " ctermfont=" is
incorrect. In highlight_set_font(), sg_font_name is freed and
updated in two separate branches, leading to redundant code.
Solution: Correct the length parameter in hlg_add_or_update().
Refactor highlight_set_font() to update the font name string
only once after a successful change is detected.
closes: #19512
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: popup: opacity feature causes flickering
(after v9.2.0016)
Solution: Only skip the mask and enable the opacity context if
w_popup_blend is greater than 0 (Hirohito Higashi).
fixes: #19510
fixes: #19499
closes: #19515
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
John Marriott [Wed, 25 Feb 2026 20:26:45 +0000 (20:26 +0000)]
patch 9.2.0058: Compile error in did_set_previewpopup()
Problem: Compile error in did_set_previewpopup() when quickfix
feature is not included (John Marriott, after v9.2.0051)
Solution: Add ifdef FEAT_QUICKFIX (John Marriott)
related: #18873
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: eval_addblob() is inefficient
Solution: Replace per-byte ga_append() loop with a single ga_grow() and
mch_memmove() for each source blob. This eliminates N grow
checks and function call overhead for blob concatenation
(Yasuhiro Matsumoto).
closes: #19494
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.2.0053: Vims list concatenation is inefficient
Problem: Vims list concatenation is inefficient
Solution: Use a single allocation of len1 + len2 using
list_alloc_with_items() (Yasuhiro Matsumoto).
Replace list_copy() + list_extend() (N+1 individual mallocs) with a
single list_alloc_with_items(len1+len2) call. This reduces the number
of memory allocations from O(N) to O(1) for the list '+' operator.
closes: #19495
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Hirohito Higashi [Tue, 24 Feb 2026 22:13:52 +0000 (22:13 +0000)]
patch 9.2.0052: Wayland: hiding lower half of command line in tiny vim
Problem: Running gvim with a tiny build under a Wayland compositor
hides the bottom half of the command line
(dezza, after v9.1.1585).
Solution: When Wayland display protocol support is not compiled in
(HAVE_WAYLAND not defined), force the X11 GDK backend to avoid
display issues. This restores the gdk_set_allowed_backends("x11")
call that was removed by patch 9.1.1585, but only for builds
without Wayland support (e.g. tiny builds, see patch 9.1.1565)
(Hirohito Higashi)
fixes: #19483
closes: #19504
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Arkissa [Tue, 24 Feb 2026 21:45:22 +0000 (21:45 +0000)]
patch 9.2.0051: 'previewpopup' is missing features available in 'completepopup'
Problem: The 'previewpopup' option lacks several customization values
that 'completepopup' supports, such as borders, shadows,
and UI handles.
Solution: Add support for "border", "borderhighlight", "close",
"resize", and "shadow" to 'previewpopup' (Arkissa)
Muraoka Taro [Tue, 24 Feb 2026 21:30:43 +0000 (21:30 +0000)]
patch 9.2.0050: WM_SETFOCUS not handled immediately
Problem: In gvim on Windows, a certain problem can occur when the
WM_SETFOCUS event sent after an external command is not
processed immediately.
Solution: After posting WM_SETFOCUS, run the message loop to process it
as quickly as possible (Muraoka Taro).
The problem is that Test_normal11_showcmd may fail when running the
test_normal.vim test. Investigation revealed that the trigger was an
external command executed in the previous test,
Test_mouse_shape_after_failed_change, when two tests were executed
consecutively. In gvim on Windows, a WM_SETFOCUS event will be sent
when an external command finishes executing. This WM_SETFOCUS event is
not processed immediately, but rather by redraw, which is expected to
update showcmd. Because it is queued in typebuf at this time,
clear_showcmd(), which expects typebuf to be empty, cannot update
showcmd.
Also added a test that simulates the above problem.
closes: #19167
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Hirohito Higashi [Tue, 24 Feb 2026 21:22:38 +0000 (21:22 +0000)]
patch 9.2.0049: Vim9: typename() wrong for lists/dicts/tuples with shared references
Problem: Vim9: typename() returns wrong type for lists/dicts/tuples
with shared references (Mao-Yining).
Solution: Reset CopyID after processing the item so it can be
re-inspected if encountered again via a different reference
(Hirohito Higashi).
fixes: #19490
closes: #19492
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
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>