Commit Graph

23788 Commits

Author SHA1 Message Date
glepnir 52003f7fc1 patch 9.2.0601: matchfuzzypos() returns garbage positions for long candidates
Problem:  A needle that only matches past char 1024 gives an INT_MIN + 1
          score with unset positions, e.g.
          matchfuzzypos([repeat('a',1024)..'z'], 'az').
Solution: Drop the candidate when match_positions() returns SCORE_MIN.

closes: #20435

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0601
2026-06-07 18:47:37 +00:00
Maxim Kim 5e22756b03 runtime(odin): update syntax/indent scripts
closes: #20438

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-07 17:29:51 +00:00
K.Takata 4eb50ba61c runtime(nsis): Update NSIS plugin
closes: #20439

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-07 17:25:55 +00:00
Ilia Dubovik 1fa6fed846 runtime(javascript): add 'Symbol' as a type; add 'void' as a reserved word
closes: #20440

Signed-off-by: Ilia Dubovik <askdubovik@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-07 17:23:34 +00:00
Foxe Chen c2dd5e1ea7 patch 9.2.0600: clientserver method needs to be given as argument
Problem:  clientserver method needs to be given as argument
Solution: Add support for the $VIM_CLIENTSERVER environment variable,
          which defines which clientserver method Vim should use
          (Foxe Chen).

closes: #20409

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0600
2026-06-05 17:46:31 +00:00
Hirohito Higashi 949caf9e91 patch 9.2.0599: popup: title set with popup_setoptions() is not shown
Problem:  When only the title is changed with popup_setoptions(), the
          popup is not redrawn until another event happens, so the new
          title does not appear right away.
Solution: Redraw the popup when the title changes.  Also allocate the new
          title and border highlights before freeing the old ones, so the
          current value is not lost on allocation failure.

fixes:  #20426
closes: #20430

Co-Authored-By: Claude Opus 4.8 (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.0599
2026-06-05 11:51:39 +00:00
Hirohito Higashi db3ce018b5 patch 9.2.0598: tests: Test_statusline() is flaky
Problem:  Test_statusline() occasionally fails in CI, reading buffer text
          instead of the status line (e.g. '9012...' instead of '57,39').
Solution: In s:get_statusline() redraw unconditionally and read the screen
          cells directly with screenstring(), instead of relying on
          ScreenLines() whose own redraw! can process events and change the
          window layout between the redraw and reading the cells.  This
          matches the already-stable s:Assert_match_statusline() helper in
          test_statuslineopt.vim.

closes: #20428

Co-Authored-By: Claude Opus 4.8 (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.0598
2026-06-05 11:46:00 +00:00
Christian Brabandt c8c63673bc patch 9.2.0597: [security]: possible code execution with python complete
Problem:  [security]: another possible code execution with python complete
          (David Carliez)
Solution: Strip default expressions and annotations from generated
          source for pythoncomplete and python3complete.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-65p9-mwwx-7468

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0597
2026-06-04 21:06:09 +00:00
Hirohito Higashi 96dbab257a patch 9.2.0596: cmdline completion popup cannot be scrolled with the mouse
Problem:  In command-line completion with a popup menu ('wildoptions'
          contains "pum"), the info popup shown next to the menu could
          not be scrolled, unlike the Insert mode completion info popup
          which scrolls with the mouse wheel.
Solution: When the mouse pointer is on top of the info popup, scroll it
          with the mouse wheel in command-line mode as well, without
          closing the completion popup menu.

closes: #20146
closes: #20418

Co-Authored-By: Claude Opus 4.8 (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.0596
2026-06-04 19:52:50 +00:00
K.Takata ed49b48482 patch 9.2.0595: MS-Windows: Wrong buffer size calculation for gvimext
Problem:  MS-Windows: Wrong buffer size calculation for gvimext
          (after 7e6d3bd3da).
Solution: Declare buffer as WCHAR, drop type casts, use
          ARRAY_LENGTH macro (Ken Takata).

closes: #20424

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0595
2026-06-04 19:40:30 +00:00
Hirohito Higashi 3ba82a5e48 patch 9.2.0594: Use-after-free with ":wqall" and a running terminal job
Problem:  Using ":wqall" with a running terminal buffer can free the
          buffer that is currently being iterated over in the buffer
          list, resulting in a use-after-free (after v9.2.0593).
Solution: After stopping the job, check whether the buffer is still valid
          and restart the iteration from the first buffer if it was freed
          (Hirohito Higashi).

related: #20417
closes:  #20423

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0594
2026-06-04 19:25:50 +00:00
Foxe Chen 2271d062e5 patch 9.2.0593: :wqall ignores term_setkill() on running terminal buffers
Problem:  :wqall ignores term_setkill() on running terminal buffers
Solution: In do_wqall(), call term_try_stop_job() on the running
          terminal buffer first (Foxe Chen).

closes: #20417

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0593
2026-06-03 19:18:04 +00:00
Foxe Chen b42e805733 patch 9.2.0592: Error when restoring session with terminal window
Problem:  Error when restoring session with terminal window
          (after v9.2.0579)
Solution: Convert to proper Vim9 script (Foxe Chen)

closes: #20416

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0592
2026-06-03 18:57:17 +00:00
glepnir a4a60c0fdb patch 9.2.0591: 'scrolljump' ignored when scrolling up
Problem:  srolljump=-100 only scrolls half a page going up, but works
          fine going down. update_topline() always falls back to
          scroll_cursor_halfway() when the cursor is far above topline.
Solution: Only center when sj is smaller than half the window. Otherwise
          call scroll_cursor_top like the downward path does (glepnir).

fixes:  #1527
closes: #20366

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0591
2026-06-03 18:48:46 +00:00
Foxe Chen 7d8971edf4 patch 9.2.0590: GTK4: drawing area loses focus shape on popup menu open
Problem:  GTK4: any focus change on the drawarea turns the cursor
          into an outline, including transient focus movement to a
          GUI popup menu and back.  The cursor flashes outline-shape
          during menu interaction.  The GTK3 GUI does not have this
          problem because it ties the cursor shape to toplevel window
          focus, not drawarea focus.
Solution: Gate focus_in_event() and focus_out_event() on
          gtk_window_is_active() of the toplevel window, matching
          GTK3 behaviour. Reverts v9.2.0588 (Foxe Chen).

closes: #20415

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0590
2026-06-03 18:19:42 +00:00
Enrico Maria De Angelis 5b76ddcc52 patch 9.2.0589: filetype: xinitrc files are not recognized
Problem:  filetype: xinitrc files are not recognized
Solution: Detect xinitrc and xserverrc files as sh filetype
          (Enrico Maria De Angelis)

Reference:
https://wiki.archlinux.org/title/Xinit#Configuration

closes: #20419

Signed-off-by: Enrico Maria De Angelis <enricomaria.dean6elis@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0589
2026-06-03 18:07:51 +00:00
nyngwang dec5b3a72a runtime(doc): Update mapping descriptions
closes: #20411

Signed-off-by: nyngwang <nyngwang@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-03 17:58:28 +00:00
bbnolauv 8eceebae71 runtime(kitty): Fix regex for kittyMapSeq region
closes: #20422

Signed-off-by: bbnolauv <86621528+bbnolauv@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-03 17:52:37 +00:00
Yasuhiro Matsumoto f1ed84158a patch 9.2.0588: GTK4: drawing area loses focus after closing a menubar popover
Problem:  After a menubar popover (e.g. File, Edit) was opened and then
          dismissed without selecting an item, keyboard focus remained
          outside the drawing area, leaving the cursor stuck in the
          unfocused (outline) shape until the pointer was moved over the
          drawarea (Foxe Chen)
Solution: Install an emission hook on GtkPopover::closed and, when a
          popover that descends from gui.menubar closes, queue an idle
          callback that grabs focus back to the drawing area. The grab
          must be deferred because GTK is still completing the close
          transition when the signal fires (Yasuhiro Matsumoto).

fixes:  #20274
closes: #20291

Co-Authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0588
2026-06-02 18:36:26 +00:00
Foxe Chen 3dc1ece6af patch 9.2.0587: GTK4: left scrollbar overlaps drawarea
Problem:  GTK4: the drawarea is wrapped in a GtkOverlay with the
          scrollbar form layered on top, so the left scrollbar
          appears over the drawarea instead of beside it.
Solution: Place the drawarea and the scrollbars as siblings inside
          the form widget, removing the GtkOverlay.  Add
          gui_mch_update_scrollbar_size() to query the actual
          scrollbar dimensions and call it from gui_set_shellsize(),
          rename GtkForm to VimForm so the GTK namespace is not used
          (Foxe Chen).

closes: #20375

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0587
2026-06-02 17:44:42 +00:00
nyngwang 18c6b91ca9 runtime(doc): fix a typo in :write-plugin
closes: #20410

Signed-off-by: nyngwang <nyngwang@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-02 17:35:54 +00:00
Hirohito Higashi de18ef6284 runtime(doc): Tweak documentation style
closes: #20412

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-01 21:25:04 +00:00
Yasuhiro Matsumoto fd30a736cc runtime(cpp): recognize C++23 stdfloat types
Add float16_t, float32_t, float64_t, float128_t and bfloat16_t from
<stdfloat> as cppType under a new cpp_no_cpp23 guard.

fixes:  #16498
closes: #20367

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-01 21:15:41 +00:00
Foxe Chen 2e7833bde9 patch 9.2.0586: Crash with TextPut autocmd when pasting in terminal buffer
Problem:  Crash with TextPut autocmd when pasting in normal mode in a
          terminal buffer.
Solution: Skip the TextPut autocmds when reg and insert are both NULL
          and regname is not '.' (Foxe Chen).

closes: #20407

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0586
2026-06-01 21:08:20 +00:00
Yasuhiro Matsumoto 77b2376769 runtime(c): classify type qualifiers, function specifiers and C23 attributes
Move const, volatile, restrict and _Atomic to a new cTypeQualifier group
and inline and _Noreturn to cFunctionSpec. Add the C23 standard attributes
deprecated, fallthrough, maybe_unused, nodiscard, unsequenced and
reproducible as cStandardAttribute, and reclassify the existing noreturn
into the same group.

The new groups link to cStorageClass, so the default highlighting and any
existing cStorageClass override are unchanged, while allowing finer-grained
customization.

fixes:  #19574
closes: #20368

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-01 21:04:08 +00:00
glepnir 64982d6010 patch 9.2.0585: line number wrong after undoing a deletion in quickfix buffer
Problem:  Deleting a quickfix line and undoing it leaves the entry
          pointing one line below where it should.
Solution: Don't shift already cleared entries in qf_mark_adjust.

closes: #20379

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0585
2026-06-01 20:43:56 +00:00
Borys Lykah bcb8dacb6d runtime(sgf): Include sgf syntax script
closes: #20380

Signed-off-by: Borys Lykah <lykahb@fastmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-01 20:36:45 +00:00
Foxe Chen 8f508cdcfb patch 9.2.0584: GTK4: missing UI features
Problem:  GTK4: :popup, menu item show/hide and menu bar state
          updates are not implemented.
Solution: Implement gui_make_popup(), gui_mch_menu_hidden() and
          gui_mch_draw_menubar() (Foxe Chen).

closes: #20393

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0584
2026-06-01 20:26:18 +00:00
glepnir 9fa5f64135 patch 9.2.0583: completion: indent not ignored for fuzzy line completion
Problem:  Indent is not stripped in whole-line completion (CTRL-X
          CTRL-L).
Solution: Skip the matched line's indent for whole-line matches in
          search_for_fuzzy_match (glepnir).

closes: #20405

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0583
2026-06-01 20:15:35 +00:00
Foxe Chen e2d1c334ee patch 9.2.0582: GTK4: compile error when XFONTSET is defined
Problem:  GTK4: compile error when XFONTSET is defined
          (simozz)
Solution: Undefine FEAT_XFONTSET when GTK4 UI is defined
          (Foxe Chen)

fixes:  #20404
closes: #20406

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0582
2026-06-01 19:46:46 +00:00
Doug Kearns 7895c9e6b8 runtime(vim): Update ftplugin, add heredocs to b:match_words
This depends on chrisbra/matchit#61 for full support of non-alphnum
heredoc markers.

closes: #20399

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-06-01 19:43:01 +00:00
Yegappan Lakshmanan 07f055f579 patch 9.2.0581: After maximizing and deleting the quickfix buffer, window height is wrong
Problem:  After maximizing and deleting the quickfix buffer, window
          height is wrong (tertium)
Solution: Reset the winfixheight option when a quickfix buffer is
          deleted from a window (Yegappan Lakshmanan)

fixes:  #3378
closes: #20403

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0581
2026-05-31 21:38:30 +00:00
Christian Brabandt e9f8e0fcbe runtime(matchit): Update matchit plugin
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-31 21:34:51 +00:00
Antonio Giovanni Colombo b7d07d3e80 translation(it): Update Italian xxd man page
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-31 21:24:16 +00:00
Hirohito Higashi f0cae9d5ab patch 9.2.0580: xxd: binary output is not colored with -R
Problem:  With xxd the -R option colors the hex output but leaves the
          binary output produced by -b uncolored (Boris Verkhovskiy)
Solution: Color the binary (bits) output per byte with the same colors as
          the hex output, update the documentation and add a test
          (Hirohito Higashi).

fixes:  #20385
closes: #20401

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0580
2026-05-31 21:11:55 +00:00
Miguel Barro d69cf0dbcf patch 9.2.0579: :mksession, :mkview and :mkvimrc emit legacy Vim script
Problem:  :mksession, :mkview and :mkvimrc emit legacy Vim script
Solution: Generate vim9 script for those commands (Miguel Barro).

fixes:  #16549
fixes:  #16688
fixes:  #19005
closes: #20152

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0579
2026-05-31 21:03:12 +00:00
Yasuhiro Matsumoto 63a9471e22 patch 9.2.0578: GTK4: :unmenu does not remove entries from the menubar
Problem:  GTK4: gui_mch_destroy_menu() never removed the entry from its
          parent GMenu, so :unmenu was effectively a no-op against the
          visible menubar model.  After "Refresh menu" the Buffers menu
          items doubled because runtime/menu.vim BMShow() re-appended
          Refresh / Delete / Alternate / Next / Previous / -SEP- into a
          still-populated GMenu.  The GAction registered for the item
          and the reference on its submenu GMenu were also leaked.
Solution: Compute the entry's position in the parent GMenu by walking
          the vimmenu_T sibling list, call g_menu_remove(), remove the
          GAction we registered, and release our reference on the
          submenu GMenu (Yasuhiro Matsumoto)

fixes:  #20262
closes: #20314

Co-Authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0578
2026-05-31 20:32:40 +00:00
Foxe Chen 568daf65b8 patch 9.2.0577: GTK4: window resizing issues
Problem:  GTK4: window size does not account for client-side decorations
Solution: Compute the client side decoration height from
          gui_resize_shell() (Foxe Chen)

fixes:  #20365
closes: #20388

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0577
2026-05-31 20:14:59 +00:00
Christian Brabandt 4f1cd5f78a patch 9.2.0576: popup_create() not blocked in secure/sandbox
Problem:  popup_create() is not gated by check_secure(), unlike the
          similar deferred-callback registrars timer_start() and
          feedkeys().  A popup created with a 'time' and 'callback' (or with
          close/filter callbacks) registers code that runs after the secure/sandbox
          context has been left, which is inconsistent with how
          timer_start() and feedkeys() handle the same situation.
Solution: Call check_secure() at the top of popup_create(), matching the
          timer_start()/feedkeys() pattern.

closes: #20400

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0576
2026-05-31 20:00:14 +00:00
Patrick Meiser-Knosowski 0878792046 patch 9.2.0575: tests: filetype test for v9.2.0557 can be improved
Problem:  tests: filetype test for v9.2.0557 can be improved
Solution: Use a correct Kawasaki robot AS test file
          (Patrick Meiser-Knosowski)

related: #20370
closes:  #20387

Signed-off-by: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0575
2026-05-31 19:52:46 +00:00
thinca b16a9ddc28 patch 9.2.0574: tests: missing test for v9.2.0572
Problem:  tests: missing test for v9.2.0572 (the patch accidentally
          included some additional unwanted changes from #20372)
          (thinca)
Solution: Add additional test for delfunc
          (thinca)

Patch 9.2.0572 fixed ":call d.key()" and ":delfunction d.key" failing
with E1017 in Vim9 script, but only the :call form was covered by a
regression test.  Add Test_delfunction_dict_funcref to exercise both
"delfunction d.key" and "delfunction d['k2']".

closes: #20372

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0574
2026-05-31 19:47:46 +00:00
Peter Kenny 38d9a16eba patch 9.2.0573: Vim9: missing EX_WHOLE on some block keywords
Problem:  Several Vim9 keywords lack EX_WHOLE and can be shortened in
          Vim9 script, inconsistent with endif/enddef/endfor/endwhile/
          endtry which already have it.  The error from :endd in a
          nested function also hardcodes "enddef" instead of reporting
          what the user typed.  fullcommand("ho") returns "horizontal"
          even though :ho is below the documented 3-char minimum.
Solution: Add EX_WHOLE to :class, :def, :endclass, :endinterface,
          :endenum, :public and :static.  In get_function_body() pass
          the user-typed command to the error message.  Force :ho to
          CMD_SIZE in find_ex_command() so fullcommand() reflects the
          modifier minimum.  Extend tests and documentation accordingly
          (Peter Kenny).

fixes:  #20032
closes: #20191

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0573
2026-05-31 19:16:57 +00:00
K.Takata 905312e0e6 NSIS: Fix 32-bit context menu
The 32-bit context menu was not translated after 8ae45e4202.
NSIS requires a space after a `!`.

closes: #20396

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-31 18:46:40 +00:00
Hirohito Higashi 09f7fc60d3 patch 9.2.0572: lines disappear with wrapping virtual text after a double-width char
Problem:  With 'nowrap', when a line ends with a double-width character
          exactly at the window width and has wrapping "after" virtual
          text, the lines below disappear and "@@@" is shown.
Solution: Detect that the last character fills the rightmost column using
          its displayed width (win_chartabsize(), so a <Tab> or double-width
          character is handled like a single-width one), and also when it
          overflows the last column.  Also clarify in the help that "wrap"
          only takes effect with the 'wrap' option set.

fixes:   #20384
related: #12213
closes:  #20395

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0572
2026-05-31 18:43:42 +00:00
thinca 37089793b8 patch 9.2.0571: Vim9: memory leak in compile_nested_function() on failure
Problem:  compile_nested_function() calls define_function(), which registers
          the new ufunc in func_hashtab with uf_refcount == 1.  For a local
          nested function the caller then reserves a local lvalue and
          generates a FUNCREF instruction; if either step fails, the code
          jumps to the theend label and leaves the ufunc behind with
          refcount 1 and no external reference, leaking it.  This mirrors
          patch 8.2.3951, which fixed the same leak for the "text after
          :enddef" branch a few lines above.
Solution: Call func_ptr_unref() on the ufunc before "goto theend" on both
          failure paths in the local-variable branch (thinca).

closes: #20394

Co-Authored-by: Claude <noreply@anthropic.com>
Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0571
2026-05-31 18:28:34 +00:00
Foxe Chen d0fffdab16 patch 9.2.0570: GTK4: mouse wheel scrolling does not work correctly
Problem:  GTK4: mouse wheel scrolling does not work correctly
Solution: Use gui_mch_getmouse() to obtain the pointer position, and
          add GTK_EVENT_CONTROLLER_SCROLL_DISCRETE to the scroll
          controller flags (Foxe Chen).

closes: #20389

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0570
2026-05-31 18:24:21 +00:00
Christian Brabandt 54ffef7eb8 patch 9.2.0569: out-of-bounds access in libvterm CSI 8 t resize
Problem:  In the bundled libvterm the CSI 8 ; rows ; cols t sequence reaches
          on_resize() without validating its arguments.  Missing, zero or
          negative dimensions cause a negative-size memmove() in
          resize_buffer() and out-of-bounds accesses in set_lineinfo() and
          DECALN, all reachable from output rendered in a terminal window
          (Yukihiro Nakamura).
Solution: Reject missing, zero or negative dimensions before calling
          on_resize().  Also clamp a negative cell width in on_text() as
          hardening for the bundled libvterm.

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0569
2026-05-31 14:27:16 +00:00
thinca 868ad62cb8 patch 9.2.0568: pythoncomplete: g:pythoncomplete_allow_import had no effect
Problem:  The security patch 9.2.0561 added a vim.eval() call inside
          Completer.evalsource() to honor g:pythoncomplete_allow_import.
          But the 'vim' module is only imported inside the outer
          vimcomplete() / vimpy3complete() function, not at the script's
          top level, so referring to it from a Completer method raises
          NameError.  The surrounding bare 'except' silently swallows
          the error and leaves allow_imports at 0, meaning the opt-in
          never takes effect -- 'import os' (and any other
          buffer-level import) is always skipped, no candidates are
          produced for 'os.<...>' and
          Test_popup_and_preview_autocommand() fails on the Windows
          CI matrix (Linux skips the test because Python 2 is absent).
Solution: Re-import 'vim' at the top of evalsource() in both
          pythoncomplete.vim and python3complete.vim so the eval reads
          the global, and set g:pythoncomplete_allow_import = 1 in the
          test (it is the opt-in intended for callers that trust the
          buffer contents) (thinca).

closes: #20386

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0568
2026-05-31 12:33:07 +00:00
thinca 2b2dfc4f5a patch 9.2.0567: dict function name allocation failure not handled
Problem:  When defining a dictionary function, the function name string
          is allocated with vim_strnsave() but the result is not
          checked. On allocation failure the dict entry is left with
          type VAR_FUNC and a NULL name, and in the overwrite case the
          previous entry has already been freed before the NULL is
          stored.
Solution: Allocate the name before modifying the dict entry and bail out
          on failure, freeing it on all error paths (thinca)

closes: #20376

Co-Authored-by: Claude <noreply@anthropic.com>
Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.2.0567
2026-05-30 18:40:55 +00:00
Mao-Yining 22a78b5de7 runtime(vim9): remove unnecessary temp variable
closes: #20374

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-30 18:32:28 +00:00