Commit Graph

23593 Commits

Author SHA1 Message Date
glepnir 38237411e4 patch 9.2.0476: pattern completion leaks memory on alloc failures
Problem:  copy_substring_from_pos() leaked on ga_grow() failures,
          expand_pattern_in_buf() leaked "match" on ga_grow() failure,
          fuzzy_match_str_with_pos() ignored ga_grow() failures
Solution: Route failures through cleanup paths, check ga_grow before
          writing to ga_data (glepnir)

closes: #20203

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0476
2026-05-12 17:40:19 +00:00
Antonio Giovanni Colombo 78302b7b4a translation(it): Update Italian manpage
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-12 17:30:26 +00:00
Foxe Chen f45ed6465d runtime(hlyamk): Allow to highlight put regions using TextPutPost
closes: #20196

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 17:23:01 +00:00
J. Paulo Seibt 74019bea8c patch 9.2.0475: runtime(netrw): bookmark paths not normalized
Problem:  the bookmarks list can have duplicate entries, more often
          in win32 (due to mixed slashes and capitalization) and when
          g:netrw_keepdir=0 (which could introduce relative paths).
          Duplicate entries could be: C:\foo\BAR\baz.file
                                     c:\foo\bar\baz.file
                                     c:/foo\BAR/baz.file
                                     BAR/baz.file
Solution: Normalize the paths and make sure they are always absolute
          (J. Paulo Seibt).

closes: #20194

Signed-off-by: J. Paulo Seibt <jpseibt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0475
2026-05-11 17:10:55 +00:00
K.Takata 7784fac15f patch 9.2.0474: MS-Windows: hard to tell which Visual Studio version was selected with MSVC
Problem:  When running msvc*.bat there is no indication of which
          Visual Studio version and target architecture got
          selected.
Solution: After vcvarsall.bat returns, echo the VS version, VC
          tools version and target architecture, and set the
          Command Prompt title accordingly (Ken Takata).

closes: #20193

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0474
2026-05-11 16:58:24 +00:00
zeertzjq a70b7a85af patch 9.2.0473: Pasting ". register without autocommands breaks TextPut*
Problem:  Pasting ". register without TextPut* autocommands breaks
          subsequent TextPut* autocommands (after 9.2.0470).
Solution: Only decrement add_last_insert if it has been incremented
          (zeertzjq).

closes: #20192

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0473
2026-05-11 16:49:19 +00:00
Yasuhiro Matsumoto 51f1447d2a patch 9.2.0472: popup: column jitters when scrolled outside viewport
Problem:  popup: column jitters horizontally when textprop is scrolled
          above the host window's top (after v9.2.0469)
Solution: Compute the virtual column from the prop's actual line via
          getvcol() and translate it through prop_win's win_col_off /
          leftcol / wincol (Yasuhiro Matsumoto).

popup_screenpos_above_top() probed textpos2screenpos() at
prop_win->w_topline using the prop's own tp_col, so the returned
screen_scol picked up topline's tab stops and multi-byte widths instead
of the prop line's own.  Once the textprop scrolled above the host's
top, the popup's wincol jittered left/right every time a wider or
narrower line rotated into the topmost slot.

Compute the virtual column from the prop's actual line via getvcol()
and translate it through prop_win's win_col_off / leftcol / wincol.
Row extrapolation from topline is unchanged.

closes: #20187

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0472
2026-05-11 16:29:27 +00:00
John Marriott 1b65cfbac5 patch 9.2.0471: vimvars di_key initialized at runtime
Problem:  evalvars_init() copies each vimvar's name into di_key at
          startup and runtime-checks that the name fits in
          DICTITEM16_KEY_LEN, even though all names are known at
          compile time.
Solution: Embed the name in di_key via the VV_NAME macro so the
          initialization happens at compile time.  Drop the
          runtime length check and the STRCPY loop (John Marriott).

closes: #20185

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0471
2026-05-11 16:22:05 +00:00
Matthew Fernandez 852f4f43ca runtime(doc): Fix manpage typo in description of '--ttyfail'
This seems to have been accidentally introduced in
ce6fe84db2.

closes: #20186

Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 16:19:16 +00:00
Christian Brabandt bfebd1209b runtime(javacc): Check for existence of javaFuncDef syn group before clearing it
fixes: #20190

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 10:15:02 +02:00
Foxe Chen e0781bd5bf patch 9.2.0470: No way to hook into put commands
Problem:  No way to hook into put commands
          (yochem)
Solution: Introduce TextPutPre and TextPutPost autocommands
          (Foxe Chen).

fixes:  #18701
closes: #20144

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0470
2026-05-10 19:17:19 +00:00
Yasuhiro Matsumoto e3d9929109 patch 9.2.0469: popup: textprop-anchored popups bleed past host window edges
Problem:  A popup anchored to a text property in a split window is
          positioned relative to the screen and may extend into
          adjacent splits or off-screen regions.  There is no way to
          confine the popup to the window that contains the textprop.
Solution: Add the "clipwindow" popup option to allow clipping the text
          property popup to the host window (Yasuhiro Matsumoto).

Adds a "clipwindow" boolean option to popup_create()/popup_setoptions().
When set on a textprop-anchored popup, the popup's drawn extent is
confined to its host (textprop) window's content rectangle so the popup
no longer bleeds across a horizontal split's statusline (top/bottom) or
a vsplit's separator (right) into another window.

The popup keeps its full logical size and position; only the rows or
columns that fall outside the host window's content area are skipped
during drawing, so a popup that scrolls toward the host's edge looks
visually "cut off" without its borders being relocated.  popup_getoptions
and popup_getpos continue to report the unclipped geometry.

Implementation:

  - w_popup_topoff / w_popup_bottomoff record how many rows of the
    popup fall outside the host on each side.  popup_adjust_position()
    computes them from the host rectangle after the logical layout is
    finalised, and update_popups() and the popup-mask builder subtract
    them when emitting cells/borders/scrollbar and when marking
    popup-owned cells.  win_update() is bracketed by transient
    w_height/w_topline/w_winrow adjustments so the buffer's drawn
    content matches the visible row range.

  - w_popup_rightclip is the horizontal counterpart for the host's
    right edge: the right border, padding and content columns past
    the host are not drawn.  win_update() is bracketed by a transient
    w_width reduction so the buffer text is not written past the
    host's right edge either.

  - When the textprop scrolls just above the host window's top, the
    popup is kept visible by extending the prop search above topline
    (new helper find_prop_in_lines) and synthesising a negative
    screen_row so the top-clip path can roll the popup off the top.
    When the textprop has scrolled far enough that even the bottom
    border would overlap the host edge -- or when the popup would
    overflow the host's left edge at all -- the popup is hidden, and
    unhidden again once it comes back within range.

  - The "reduce-height" / "clamp winrow to 0" fallbacks in
    popup_adjust_position are bypassed for host-clipped popups so the
    popup keeps its natural anchored position instead of being
    snapped to the screen edge.

    Left-edge partial clipping is intentionally not supported: it
    would require shrinking the buffer width during win_update, which
    reflows wrapped lines and corrupts the displayed content; the
    popup is hidden instead.

closes: #20166

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0469
2026-05-10 19:02:38 +00:00
Yasuhiro Matsumoto ef1ecc3b61 patch 9.2.0468: popups: not correctly updated from a CmdlineChanged autocommand
Problem:  popup_show() from a CmdlineChanged autocommand doesn't update
          the screen (Mao-Yining)
Solution: Refresh the screen when popups need redraw
          (Yasuhiro Matsumoto).

popup_settext()/popup_show() called from a CmdlineChanged autocommand
did not refresh the screen because cmdline mode normally skips
update_screen(), so async info-popup updates only became visible after
a manual :redraw.  Refresh the screen when popups need redrawing right
after the autocommand.

fixes:  #20175
closes: #20179

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0468
2026-05-10 18:20:01 +00:00
Hirohito Higashi 5ef1eec5c5 patch 9.2.0467: multi-line statusline loses highlighting attributes
Problem:  In a multi-line statusline (and 'tabpanel'), %#XX# / %N*
          set on one row do not persist on subsequent rows.
          build_stl_str_hl_local() rebuilds stl_items[] from scratch
          on every line break ("%@" or "\n"), so the highlight is
          reset at each row boundary even though within a row it
          stays until %* (or another %# / %*).
Solution: Carry the last Highlight item's stl_minwid across line
          breaks via a new in/out int* parameter "carry_hl".  At the
          start of each row, pre-insert a Highlight item from the
          carried value so the row begins under the same highlight;
          before returning, update the carried value with the row's
          final Highlight item.  Apply the same carry to the
          tabpanel rendering loop (Hirohito Higashi).

related: #19123
closes:  #20180

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0467
2026-05-10 18:14:01 +00:00
Yasuhiro Matsumoto 3a8b9e09b2 patch 9.2.0466: popup: redraw can use stale blended cells
Problem:  popup: redraw can use stale blended cells
Solution: Save the old popup area and redraw the newly exposed region so
          opacity popups don't show stale blended cells when another
          popup moves or closes. Consolidate redraw helpers so the
          saved-area and exposed-area logic is shared across
          move/hide/close/settext/setoptions. Refactor popup redrawing
          code, add a regressions tests (Yasuhiro Matsumoto).

closes: #20172

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0466
2026-05-10 17:23:12 +00:00
Christian Brabandt 2020e0bade patch 9.2.0465: modeline: foldmarker cannot be set with modelinestrict
Problem:  modeline: foldmarker cannot be set with modelinestrict
          (Lyderic Landry, after v9.2.0350)
Solution: Add foldmarker option to the whitelist

fixes:  #20028
closes: #20174

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0465
2026-05-10 17:00:59 +00:00
J. Paulo Seibt ec76ac620b patch 9.2.0464: runtime(netrw): bookmarking directory uses current dir
Problem:  runtime(netrw): bookmarking directory uses current dir
Solution: Correctly handle netrw actual directory (J. Paulo Seibt)

fixes:  #10481
closes: #20169

Signed-off-by: J. Paulo Seibt <jpseibt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0464
2026-05-10 16:55:18 +00:00
Yegappan Lakshmanan 6b8d2262d3 patch 9.2.0463: Not able to use legacy expression evaluation in a vim9script maps
Problem:  Not able to use legacy expression evaluation in a vim9script
          maps
Solution: Explicitly set script version to 1 when the :legacy modifier has been
          used (Yegappan Lakshmanan).

fixe:   #20176
closes: #20177

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0463
2026-05-10 16:41:35 +00:00
K.Takata 3a1ac7ced2 patch 9.2.0462: MS-Windows: workaround for assert error on GUI
Problem:  When Vim is built with debug mode, gvim causes an assertion
          error and stops working when running on Visual Studio
          Debugger.
Solution: Stop calling _set_fmode() if not needed (Ken Takata).

closes: #20181

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0462
2026-05-10 16:34:01 +00:00
Christian Brabandt 4f610f07b7 patch 9.2.0461: Corrupted undofile causes use-after-free
Problem:  The four pointer-resolution loops in u_read_undo() lack
          an i != j guard, so a header whose uh_next.seq equals
          its own uh_seq resolves uh_next.ptr to itself.  On
          buffer close, u_freeheader() sees uhp->uh_next.ptr !=
          NULL and skips updating b_u_oldhead, so u_blockfree()
          dereferences the freed header on the next iteration.
          The same pattern applies to uh_prev, uh_alt_next and
          uh_alt_prev.  A crafted .un~ file in the same directory
          as a text file can trigger the use-after-free and
          subsequent double-free when the buffer is closed.
          (Daniel Cervera)
Solution: Add an i != j guard to each of the four resolution
          loops, matching the guard already present in the
          duplicate-detection loop above.

closes: #20168

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0461
2026-05-09 14:41:37 +00:00
zeertzjq abd74fa122 patch 9.2.0460: did_set_shellpipe_redir() in wrong file
Problem:  did_set_shellpipe_redir() is a callback for a string option,
          but is not in optionstr.c (after 9.2.0458).
Solution: Move it to optionstr.c. Also add missing change from patch
          9.2.0455 (zeertzjq).

related: #20159
related: #20164
closes:  #20170

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0460
2026-05-09 14:22:47 +00:00
Christian Brabandt 124f8becec patch 9.2.0459: tests: test_termcodes fails (after v9.2.0456)
Problem:  tests: test_termcodes fails, because it disabled DECRQM, but
          did not adjust the expected values in the test (after v9.2.0456)
Solution: Update the test

related: #20161
closes:  #20173

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0459
2026-05-09 14:13:52 +00:00
dependabot[bot] fbec828c7e CI: Bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [github/codeql-action](https://github.com/github/codeql-action) and [actions/labeler](https://github.com/actions/labeler).

Updates `github/codeql-action` from 4.35.2 to 4.35.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.35.2...v4.35.3)

Updates `actions/labeler` from 6 to 6.0.1
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v6...v6.0.1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/labeler
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

closes: #20171

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-09 13:49:57 +00:00
Christian Brabandt 84ae09dd79 patch 9.2.0458: Crash with invalid shellredir/shellpipe value
Problem:  Crash with invalid shellredir/shellpipe value
          (bfredl)
Solution: Validate the option and allow only a single "%s".

fixes:  #20157
closes: #20159

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0458
2026-05-08 21:32:21 +00:00
Christian Brabandt 2f00656b34 patch 9.2.0457: Compile warning about unused variable
Problem:  Compile warning about unused variable
          (Tony Mechelynck, after v9.2.0452)
Solution: Initialize the variable

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0457
2026-05-08 21:22:28 +00:00
Foxe Chen 7644d9d611 patch 9.2.0456: stray p character displayed on some terms
Problem:  stray p character displayed on some terms
Solution: Make sending DECRQM more strict and disable it for a few more
          terminals (Foxe Chen)

fixes:  #20156
fixes:  #20140
closes: #20161

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0456
2026-05-08 21:14:52 +00:00
zeertzjq 9694ff58fe patch 9.2.0455: 'findfunc' only allows extra info for cmdline completion
Problem:  'findfunc' only allows extra info for cmdline completion, not
          for actually finding files (Maxim Kim, after 9.2.0451).
Solution: Handle returning a list of dicts when actually finding files.
          Also fix crash on NULL string (zeertzjq).

fixes:  #20163
closes: #20164

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0455
2026-05-08 21:09:48 +00:00
zeertzjq b207b5a2a3 patch 9.2.0454: tests: no test that "abbr" in customlist completion is shown
Problem:  No test that "abbr" in customlist completion is shown in pum.
Solution: Add some "abbr" fields to the existing test (zeertzjq).

closes: #20165

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0454
2026-05-08 21:06:08 +00:00
Hirohito Higashi c895390e58 patch 9.2.0453: vertical separator of statusline blend into active statusline
Problem:  Since v9.2.0349, the vertical separator cell at status line
	  rows is drawn as a space with StatusLine highlight, hiding the
	  user's 'fillchars' "vert" or "stl"/"stlnc" character at that
	  cell (after v9.2.0349)
Solution: Drop the status line blend.  At status line rows the separator
	  cell goes back to using the status fillchar when adjacent
	  status lines are connected, or the vsep character otherwise.
	  (Same as before v9.2.0348)

Keep the VertSplitNC highlight group introduced in v9.2.0349.  The
highlight (VertSplit vs VertSplitNC) is selected based on whether the
current window is adjacent to the separator at the row.

Vertical separators are redrawn on current-window changes and on
:redrawstatus[!] so the VertSplit/VertSplitNC highlight is updated
immediately.

fixes:   #20089
related: #19951
closes:  #20167

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0453
2026-05-08 21:03:12 +00:00
Yasuhiro Matsumoto b9871cef10 patch 9.2.0452: screen.c popup opacity blend logic is duplicated
Problem:  screen_line() has four near-identical blocks computing
          the popup_attr, the combined attr, the blend value and
          the underlying base attr in sequence when handling popups
          with opacity.  The duplication makes the function long
          and hard to follow, and changes have to be applied to all
          four sites.
Solution: Extract the shared computation into popup_blend_with_base()
          and popup_base_attr_or() helpers, and cache per-popup
          attrs once via popup_opacity_T.  No behavior change
          (Yasuhiro Matsumoto).

closes: #20154

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0452
2026-05-07 19:40:16 +00:00
zeertzjq 58124789aa patch 9.2.0451: 'findfunc' can't return extra info for cmdline completion
Problem:  'findfunc' can't return extra info for cmdline completion
          (Maxim Kim).
Solution: Handle 'findfunc' return value in cmdline completion like that
          of "customlist" functions (zeertzjq).

fixes:  #20155
closes: #20158

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0451
2026-05-07 19:32:23 +00:00
Christian Brabandt 9299332917 patch 9.2.0450: [security]: heap buffer overflow in spellfile.c read_compound()
Problem:  read_compound() in spellfile.c computes the size of the regex
          pattern buffer using signed-int arithmetic on the attacker
          controlled SN_COMPOUND sectionlen.  With sectionlen=0x40000008
          and UTF-8 encoding active the multiplication wraps to 27 while
          the per-byte loop writes up to ~1B bytes, overflowing the heap.
          Reachable when loading a crafted .spl file (e.g. via 'set spell'
          after a modeline sets 'spelllang').  The cp/ap/crp allocations
          have the same int + 1 overflow class (Daniel Cervera)
Solution: Use type size_t as buffer size and reject values larger than
          COMPOUND_MAX_LEN (100000).  Apply the same size_t treatment to
          the cp/ap/crp allocations.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-q4jv-r9gj-6cwv

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0450
2026-05-07 18:49:53 +00:00
Yasuhiro Matsumoto 4cbdef8e30 runtime(vim9): Check cmd.exe on WSL is executable
closes: #20150

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-06 18:24:51 +00:00
Christian Brabandt 0ab4316fce patch 9.2.0449: Make proto fails in non GTK builds
Problem:  Make proto fails when not building the GTK gui
Solution: Test for $GLIB_COMPILE_RESOURCES as done elsewhere

closes: #20145

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0449
2026-05-06 18:17:00 +00:00
Yasuhiro Matsumoto 4bcc8ba93d patch 9.2.0448: Vim9: dangling cmdline pointer after skip_expr_cctx()
Problem:  Vim9: dangling cmdline pointer after skip_expr_cctx()
          (Foxe Chen)
Solution: Extract the cmdline restoration logic from compile_lambda into
          a helper restore_cmdline_arg() and call it from
          skip_expr_cctx() too, so a skipped lambda inside an "else"
          branch does not leave "*arg" pointing into freed evalarg
          memory (Yasuhiro Matsumoto).

fixes:  #20147
closes: #20148

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0448
2026-05-06 18:02:09 +00:00
magnus-rattlehead c06002f3cb patch 9.2.0447: cindent does not ignore comments
Problem:  When find_start_brace() scans backwards for the enclosing
          block, '{' and '}' inside // and /* */ comments are counted,
          producing wrong indent for code following such comments
          (rendcrx).
Solution: Implement FM_SKIPCOMM in findmatchlimit() to track block-
          comment state and skip matches inside comments. Pass
          FM_SKIPCOMM from cindent's call sites
          (find_start_brace, find_match_char, cin_iswhileofdo,
          get_c_indent).

fixes:  #4
fixes:  #648
fixes:  #19578
closes: #19581
closes: #20111

Signed-off-by: magnus-rattlehead <guranjakustivi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0447
2026-05-05 21:14:33 +00:00
J. Paulo Seibt 7ccc273a4c patch 9.2.0446: runtime(netrw): off-by-one bug in s:NetrwUnMarkFile()
Problem:  off-by-one bug in s:NetrwUnMarkFile()
Solution: Correctly loop through all buffers to unlet all variables
          (J. Paulo Seibt)

When the function loops through buffers to clear s:netrwmarkfilelist_#
and s:netrwmarkfilemtch_#, it skips the last one at bufnr('$'), messing
up mark highlights and causing other functions that operate on those
arrays (like delete or rename) to target stale marked files.

The bufnr() help page says that bufnr("$") returns the highest buffer
number of existing buffers, so while ibuf < bufnr("$") does not clear
the last buffer-local arrays.

To reproduce:

Just opening a fresh Vim and running :Ex opens a netrw buffer at the
highest number. Then, typing mu after marking some files triggers the
mark highlight bug, and finally typing D would act like calling the
delete function against the previous marked files, as the buffer-local
arrays where not touched by s:NetrwUnMarkFile.

closes: #20129

Signed-off-by: J. Paulo Seibt <jpseibt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0446
2026-05-05 20:09:58 +00:00
Jesse Rosenstock 40fc78f0a1 patch 9.2.0445: win_fix_scroll() called before win_comp_pos() in command_height()
Problem:  win_fix_scroll(true) is called before win_comp_pos() in
          command_height().
Solution: Move win_fix_scroll(true) after win_comp_pos(), matching the
          ordering used in win_drag_status_line() (Jesse Rosenstock).

Patch 9.2.0413 added win_fix_scroll(true) to command_height() to handle
splitkeep when cmdheight changes, but placed the call before win_comp_pos().
win_fix_scroll() reads w_winrow to detect window movement
(https://github.com/vim/vim/blob/620557bd48865fa3d927901764d2747bf68597b5/src/window.c#L7266),
but w_winrow is not recomputed until win_comp_pos() runs
(https://github.com/vim/vim/blob/620557bd48865fa3d927901764d2747bf68597b5/src/window.c#L6516).
This causes incorrect scroll adjustments and was breaking
Test_smoothscroll_incsearch on macOS CI.

closes: #20138

Co-authored-by: Gemini
Signed-off-by: Jesse Rosenstock <jmr@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0445
2026-05-05 19:50:46 +00:00
Christian Brabandt 88fb739918 patch 9.2.0444: Cannot set 'path' option via modeline
Problem:  Cannot set 'path' option via modeline (zeertzjq, after v9.2.0435)
Solution: Revert the part that disallows setting 'path' via modeline.

closes: #20137

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0444
2026-05-05 19:47:19 +00:00
Hirohito Higashi cf947e7ef0 patch 9.2.0443: GUI: cancelling save dialog overwrites or discards unnamed buffer
Problem:  When closing gvim with an unsaved unnamed buffer, choosing
          "Yes" in the "Save changes?" dialog and then "Cancel" in the
          file selection dialog either silently writes the buffer to a
          file named "Untitled" (overwriting any existing file with
          that name) or discards the buffer altogether
          (vibs29, after v9.1.0265).
Solution: In dialog_changed(), if browse_save_fname() leaves the buffer
          without a file name, treat it as a cancel and return without
          saving.  Also stop clearing the modified flag in the restore
          path on write failure, so the unsaved changes are kept and
          the caller (e.g. gui_shell_closed()) can also cancel the
          close.  Pre-fill the file dialog with "Untitled" to match
          the preceding "Save changes to ..." prompt.  Add a test for
          the write-failure path (Hirohito Higashi).

fixes:  #20132
closes: #20143

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0443
2026-05-05 19:02:59 +00:00
zeertzjq 2bfddbea47 patch 9.2.0442: completion: i_CTRL-X_CTRL-V doesn't use dict from customlist
Problem:  Completion with i_CTRL-X_CTRL-V doesn't use dict from cmdline
          "customlist" completion.
Solution: Include abbr/kind/menu/info in the completion items
          (zeertzjq).

closes: #20139

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0442
2026-05-05 18:56:56 +00:00
Arnaud Rebillout 1903020b82 runtime(autopkgtest): update syntax script
Fix some typos, and move a deprecated keyword where it belongs

closes: #20141

Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-05 18:53:33 +00:00
mityu b10159bcc2 Fix wrong comment in getchar.c
The comment for `do_key_input_pre()` function says that it handles the
InsertCharPre autocommand, but what the function actually handles is the
KeyInputPre autocommand.

closes: #20142

Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 20:24:07 +00:00
Hirohito Higashi 8c7d824b73 patch 9.2.0441: statusline: click handler not called on multi-line statusline
Problem:  With a multi-line statusline clicking on a "%[FuncName]...%[]"
          or "%@FuncName@..." region defined on a row other than the
          last drawn row does not invoke the handler (Christian
          Robinson, after v9.2.0338)
Solution: In win_redr_custom() the click region table reflects only the
          last iteration of the per-row draw loop, so click regions are
          recorded only for the last row.  Move the click-region
          resolution inside the loop and append regions for each row
          using vim_realloc().  This also fixes a leak of
          clicktab[].funcname for non-last rows (Hirohito Higashi).

fixes:  #20116
closes: #20120

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0441
2026-05-04 20:03:46 +00:00
Yasuhiro Matsumoto 0c998003bc patch 9.2.0440: MS-Windows: cursor flicker during update_screen()
Problem:  MS-Windows: cursor flicker during update_screen()
Solution: Hide the cursor during update_screen() to avoid Windows ConPTY
          flicker (Yasuhiro Matsumoto).

On terminals that do not honor synchronized output mode (e.g. Windows
ConPTY), update_screen() emits cell positioning and content as multiple
Win32 console writes through mch_write(), which the terminal renders as
separate frames.  This shows up as the cursor briefly jumping to column
1 of rows being redrawn, especially during async redraws around the
popup completion menu.

Disable the cursor with cursor_off() at the start of update_screen()
and restore it with cursor_on() at the end, but only when synchronized
output mode is not active.  When it is, the redraw is already atomic
from the terminal's view and hiding the cursor would only add visible
blink with no benefit.

closes: #20121

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0440
2026-05-04 19:58:27 +00:00
zeertzjq 3bfffcc290 patch 9.2.0439: completion: info popup not removed in cmdline mode
Problem:  Info popup isn't removed when selecting an item that doesn't
          have "info" in cmdline completion, which is inconsistent with
          Insert mode behavior.
Solution: Set pum_call_update_screen in cmdline mode (zeertzjq).

closes: #20128

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0439
2026-05-04 19:53:10 +00:00
Jesse Rosenstock 20a124a6e0 patch 9.2.0438: tests: test_plugin_termdebug is flaky
Problem:  Test_termdebug_tbreak(), Test_termdebug_basic(), and
          Test_termdebug_toggle_break() use synchronous assert_equal()
          to check breakpoint signs immediately after sending commands
          to gdb.  On slow CI (ASAN, ARM64, macOS) gdb may not have
          processed the response yet, causing the sign to be missing.
Solution: Wrap the three assertions in WaitForAssert() to poll until
          the signs are placed, matching the pattern already used by
          the other assertions in the same tests (Jesse Rosenstock).

closes: #20133

Co-authored-by: Gemini
Signed-off-by: Jesse Rosenstock <jmr@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0438
2026-05-04 19:22:25 +00:00
Hirohito Higashi bb807ebc8a runtime(doc): Tweak documentation style
closes: #20134

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 19:17:52 +00:00
Felipe Matarazzo cb0b4cf45c Fix a few more typos
closes: #20135

Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 19:10:37 +00:00
Yasuhiro Matsumoto 9d3019104c patch 9.2.0437: MS-Windows: cursor flicker in vtp mode
Problem:  MS-Windows: cursor flicker in vtp mode
Solution: Skip mch_update_cursor() in cursor_visible() when vtp is
          active (Yasuhiro Matsumoto).

In vtp (ConPTY) mode the cursor visibility is controlled by DECTCEM
(\033[?25h / \033[?25l).  The follow-up call to mch_update_cursor() then
re-emits DECSCUSR (\033[0 q etc.) on every visibility toggle even though
the cursor shape did not change.  Some terminals briefly redisplay the
cursor when DECSCUSR arrives, so this can cause a visible flash at the
position the cursor will be moved to next (e.g. column 0 ahead of a line
redraw).

In non-vtp mode the call is still required because SetConsoleCursorInfo()
inside mch_set_cursor_shape() reads s_cursor_visible to apply the
visibility change, so keep that path unchanged.

closes: #20122

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0437
2026-05-03 18:37:05 +00:00