Commit Graph

1927 Commits

Author SHA1 Message Date
zeertzjq
93a8acb1b8 vim-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: vim/vim#19260

d0fa375629

Co-authored-by: DuckAfire <155199080+duckafire@users.noreply.github.com>
2026-02-20 09:26:07 +08:00
zeertzjq
c78e276881 vim-patch:9.2.0027: filetype: yara files are not recognized
Problem:  filetype: yara files are not recognized
Solution: Detect *.yara and *.yar files as yara filetype
          (Thomas Dupuy).

Reference:
- https://github.com/VirusTotal/yara
- https://github.com/VirusTotal/yara-x

closes: vim/vim#19460

7d93ae57f0

Co-authored-by: Thomas Dupuy <thom4s.d@gmail.com>
2026-02-20 09:17:46 +08:00
zeertzjq
6e8a1a8988 vim-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:  vim/vim#19434
closes: vim/vim#19443

d8648f7279

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-02-20 09:01:20 +08:00
zeertzjq
08b8fe5ab3 vim-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:  vim/vim#19328
closes: vim/vim#19447

a04ae0210b

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 08:58:41 +08:00
zeertzjq
785ac9f228 vim-patch:9.2.0028: matchadd() conceal may use unrelated syntax cchar (#37974)
Problem:  matchadd() conceal may use unrelated syntax cchar.
Solution: Only use syntax cchar when syntax_flags has HL_CONCEAL
          (zeertzjq).

closes: vim/vim#19459

d01f234ec1
2026-02-19 22:51:31 +00:00
zeertzjq
e98a6979ee vim-patch:9.2.0025: filetype: cshtml incorrectly recognized (#37957)
Problem:  filetype: cshtml incorrectly recognized, razor files are not
          recognized
Solution: Detect *.cshtml and *.razor files as razor filetype
          (tris203)

Reference:
https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-10.0

closes: vim/vim#19207

68dbb58d51

Co-authored-by: tris203 <admin@snappeh.com>
2026-02-19 02:46:27 +00:00
zeertzjq
ac84a3f3b6 vim-patch:9.2.0020: Wrong shortened buffer after :cd with duplicate slashes (#37955)
Problem:  Wrong shortened buffer name after :cd with duplicate slashes.
Solution: Skip over multiple consecutive path separators (zeertzjq).

related: neovim/neovim#37080
closes:  vim/vim#19444

f245e17ac7

N/A patches:
vim-patch:9.0.1859: heap-use-after-free in bt_normal()
vim-patch:9.2.0022: bt_quickfix() is slow
2026-02-19 07:46:10 +08:00
zeertzjq
4450a45466 vim-patch:9.1.1954: Setting a byte in a blob, accepts values outside 0-255
Problem:  Setting a byte in a blob, accepts values outside 0-255
Solution: When setting a byte in a blob, check for valid values
          (Yegappan Lakshmanan)

closes: vim/vim#18870

f4a299700e

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2026-02-16 21:17:02 +08:00
zeertzjq
cbec4603a0 vim-patch:partial:9.1.1668: items() does not work for Blobs
Problem:  items() does not work for Blobs
Solution: Extend items() to support Blob
          (Yegappan Lakshmanan).

closes: vim/vim#18080

da34f84847

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2026-02-16 21:17:02 +08:00
zeertzjq
992543c361 vim-patch:8.2.3841: Vim9: outdated TODO items, disabled tests that work (#37900)
Problem:    Vim9: outdated TODO items, disabled tests that work.
Solution:   Remove TODO items, run tests that work now.  Check that a dict
            item isn't locked.

71b7685092

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-02-16 12:32:18 +00:00
zeertzjq
cf68c82598 test(old): restore test coverage for invalid 'statusline' flag 2026-02-16 08:24:19 +08:00
zeertzjq
77d396caf4 vim-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.

9308c85a7e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-16 08:23:19 +08:00
zeertzjq
b59eba3ada vim-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: vim/vim#19397

9af18686c7

Co-authored-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
2026-02-16 08:23:18 +08:00
zeertzjq
7d8653575f vim-patch:9.2.0004: Changing hidden prompt buffer cancels :startinsert/:stopinsert (#37881)
Problem:  Changing hidden prompt buffer cancels :startinsert/:stopinsert
          (after 9.0.1439).
Solution: Don't change mode for a prompt buffer in an autocommand
          window (zeertzjq).

closes: vim/vim#19410

8b81a6b6e1
2026-02-15 22:51:03 +00:00
Riley Bruins
4719b94443 feat(statusline): option to specify stacking highlight groups #37153
**Problem:** No easy way to stack highlight groups #35806.

**Solution:** Add a way to specify a new statusline chunk with a
highlight group that inherits from previous highlight attributes.

Also applies to tabline, etc.
2026-02-15 12:16:51 -05:00
Yochem van Rosmalen
b5ce7e74dc refactor(help): move local-additions to Lua #37831
Problem:
- ~200 line function of hard-to-maintain C code.
- Local Addition section looks messy because of the varying description
  formats.

Solution:
- Move code to Lua.
- Have a best-effort approach where short descriptions are right
  aligned, giving a cleaner look. Long descriptions are untouched.
2026-02-14 05:30:18 -05:00
zeertzjq
39d8a9c353 vim-patch:9.1.2146: filetype: cel files are not recognized (#37834)
Problem:  filetype: cel files are not recognized
Solution: Detect *.cel files as cel filetype (Stefan VanBuren).

Reference:
https://cel.dev/
e36c49febc/testing/src/test/resources/expressions/coverage_test_case/simple_expression.cel
d0d2dbabae/example.cel

closes: vim/vim#19381

fb5777fa20

Co-authored-by: Stefan VanBuren <svanburen@buf.build>
2026-02-13 08:34:00 +08:00
luukvbaal
4260f73e13 fix(messages): unwanted newlines with ext_messages #37733
Problem:  Newlines intended to write messages below the cmdline or to
          mark the start of a new message on message grid are emitted
          through ext_messages. This results in unnecessary newlines for
          a UI that has decoupled its message area from the cmdline.
          msg_col is set directly in some places which is not transmitted
          to msg_show events.
          Various missing message kind for list commands.
          Trailing newlines on various list commands.

Solution: Only emit such newlines without ext_messages enabled.
          Use msg_advance() instead of setting msg_col directly.
          Assign them the "list_cmd" kind.
          Ensure no trailing newline is printed.
2026-02-08 09:47:02 -05:00
zeertzjq
ed8fbd2e29 vim-patch:9.1.2138: win_execute() and 'autochdir' can corrupt buffer name (#37767)
Problem:  With 'autochdir' win_execute() can corrupt the buffer name,
          causing :write to use wrong path.
Solution: Save and restore b_fname when 'autochdir' is active
          (Ingo Karkat).

This is caused by a bad interaction of the 'autochdir' behavior,
overriding of the current directory via :lchdir, and the temporary
window switching done by win_execute(), manifesting when e.g. a custom
completion inspects other buffers:
1. In the initial state after the :lcd .. we have curbuf->b_fname =
   "Xsubdir/file".
2. do_autochdir() is invoked, temporarily undoing the :lcd .., changing
   back into the Xsubdir/ subdirectory.
3. win_execute() switches windows, triggering win_enter_ext() →
   win_fix_current_dir() → shorten_fnames(TRUE)
4. shorten_fnames() processes *all* buffers
5. shorten_buf_fname() makes the filename relative to the current
   (wrong) directory; b_fname becomes "file" instead of "Xsubdir/file"
6. Directory restoration correctly restores working directory via
   mch_chdir() (skipping a second do_autochdir() invocation because
   apply_acd is FALSE), but b_fname remains corrupted, with the
   "Xsubdir/" part missing.
7. expand("%:p") (and commands like :write) continue to use the
   corrupted filename, resolving to a wrong path that's missing the
   "Xsubdir/" part.

To fix the problem the short filename is saved if its in effect (i.e.
pointed to by curbuf->b_fname) and 'autochdir' happened. It's then
restored in case of a local cwd override. The conditions limit this
workaround to when 'autochdir' is active *and* overridden by a :lchdir.

closes: vim/vim#19343

abb4d74033

Co-authored-by: Ingo Karkat <swdev@ingo-karkat.de>
2026-02-08 07:04:36 +08:00
zeertzjq
72eb9fe87c vim-patch:partial:9.1.2137: test: Update tests for OpenBSD (#37766)
Problem:  Some tests are not valid on OpenBSD.
Solution: Add CheckNotOpenBSD, use it to skip certain tests
          (Kevin Goodsell).

Test_readdirex_sort performs locale-dependent sorting. OpenBSD has
minimal locale support.

Test_stdin_no_newline hangs on OpenBSD and FreeBSD. I don't know exactly
why, but it may be due to bash not exiting at the end of the test. This
is skipped in the FreeBSD CI runs because bash is not installed.

Test_detect_fifo uses /dev/fd/ files (via process substitution) as
FIFOs. On OpenBSD the files in /dev/fd are not FIFOs.

closes: vim/vim#19351

a24cb278bd

Co-authored-by: Kevin Goodsell <kevin-opensource@omegacrash.net>
2026-02-08 07:03:41 +08:00
zeertzjq
e704529909 vim-patch:9.1.2136: :tab sbuffer may close old tabpage (#37765)
Problem:  :tab sbuffer may close old tabpage if BufLeave autocommand
          splits window (after 9.1.0143).
Solution: Only close other windows if the buffer will be unloaded
          (zeertzjq).

related: neovim/neovim#37749
closes: vim/vim#19352

6da9f757c4
2026-02-07 23:03:21 +08:00
zeertzjq
6dd0a7d60a vim-patch:9.1.2135: tests: tar plugin does not consider 'nowrapscan' (#37752)
Problem:  search() is used to check for the message from tar that
          indicates leading slashes found in the tar archive, or to
          check for the leading slashes themselves. However, if
          'nowrapscan' is in effect these searches are limited to the
          last line and don't find any results. This causes the warning
          message from tar to be seen in the buffer, the "Path Traversal
          Attack Detected" message to be omitted, and editing actions
          can fail. This can be seen, for example, when editing
          src/testdir/samples/evil.tar.
Solution: Use the 'w' flag for search() (Kevin Goodsell)

closes: vim/vim#19333

18d844e365

Co-authored-by: Kevin Goodsell <kevin-opensource@omegacrash.net>
2026-02-06 20:25:14 +08:00
zeertzjq
15061d322d vim-patch:9.1.2133: Another case of buffer overflow with 'helpfile' (#37746)
Problem:  Another case of buffer overflow with 'helpfile'.
Solution: Leave room for "tags" in the buffer (zeertzjq).

closes: vim/vim#19340

21d591fb12
2026-02-06 18:29:24 +08:00
zeertzjq
db133879b2 vim-patch:9.1.2132: [security]: buffer-overflow in 'helpfile' option handling (#37735)
Problem:  [security]: buffer-overflow in 'helpfile' option handling by
          using strcpy without bound checks (Rahul Hoysala)
Solution: Limit strncpy to the length of the buffer (MAXPATHL)

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-5w93-4g67-mm43

0714b15940

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-06 07:40:51 +08:00
zeertzjq
bdd886622d vim-patch:9.1.2130: Page scrolling in Insert mode beeps (#37710)
Problem:  Page scrolling in Insert mode beeps (after 9.1.0211).
Solution: Fix incorrect return value of pagescroll(). Also invert the
          return value of scroll_with_sms() to be less confusing and
          match comments (zeertzjq).

fixes:  vim/vim#19326
closes: vim/vim#19327

a8ce914db1
2026-02-04 23:36:57 +00:00
Sean Dewar
fede568692 vim-patch:9.1.2128: Heap use after free in buf_check_timestamp()
Problem:  heap UAF if autocommands from reloading a file changed outside
          of Vim wipe its buffer.
Solution: Validate the bufref after buf_reload (Sean Dewar)

closes: vim/vim#19317

392b428d12

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2026-02-03 17:38:57 +00:00
zeertzjq
270c7b46af vim-patch:9.1.2123: using NOT with a float returns a float in legacy script (#37639)
Problem:  using NOT with a float returns a float in legacy vim script
          (kennypete)
Solution: Return a number instead of a float (Yegappan Lakshmanan)

fixes:  vim/vim#19282
closes: vim/vim#19289

ecc3faef61

N/A patches:
vim-patch:8.2.1980: Vim9: some tests are not done at the script level
vim-patch:9.1.2122: Vim9: Negating a float doesn't result in a bool

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2026-01-31 13:50:54 +00:00
zeertzjq
47ce93ad6d vim-patch:9.1.2118: 'cursorline' missing after :diffput to empty buf (#37628)
Problem:  'cursorline' and part of 'statusline' are missing after
          :diffput to an empty buffer.
Solution: Make sure the cursor doesn't go beyond the last line after
          :diffput (zeertzjq)

related: neovim/neovim#37621
closes:  vim/vim#19281

ce1e562fda
2026-01-30 20:09:33 +08:00
Kevin Goodsell
5e1a3df5ae vim-patch:9.1.2119: tests: Test_language_cmd fails on OpenBSD (#37503)
Problem:  tests: Test_language_cmd fails on OpenBSD because the test
          uses an invalid locale name and expects the command to produce
          an error. OpenBSD accepts (almost) any locale name as valid by
          design, so the :lang command succeeds and the test fails.
Solution: Slightly update the "bad" locale name to make it something
          that OpenBSD considers invalid by adding a dot (but not ending
          with ".UTF-8"). Maintain the original two underscores in the
          name because that ensures Windows will also see it as invalid
          (Kevin Goodsell).

closes: vim/vim#19280

371583642a
2026-01-30 18:58:37 +08:00
zeertzjq
a8a097d178 vim-patch:9.1.2112: long statusline may crash if using singlebyte encoding (#37605)
Problem:  long statusline may crash if using singlebyte encoding
          (fizz-is-on-the-way)
Solution: Drop the non-mbyte codepath and always use the mbyte code
          (zeertzjq)

3f7be0d7e1
2026-01-28 23:30:14 +00:00
zeertzjq
d982c00846 vim-patch:9.1.2110: filetype: skhd files are not recognized
Problem:  filetype: skhd files are not recognized
Solution: Detect .skhdrc and skhdrc as skhd filetype,
          include a syntax and filetype plugin, add syntax tests
          (Kiyoon Kim)

Add syntax highlighting for skhd (simple hotkey daemon for macOS)
configuration files. Includes filetype detection for skhdrc and
.skhdrc files.

Reference:
- https://github.com/asmvik/skhd

closes: vim/vim#19235

e5f61842b5

Co-authored-by: Kiyoon Kim <kiyoon@users.noreply.github.com>
2026-01-26 07:00:32 +08:00
zeertzjq
798ee64287 vim-patch:9.1.2109: filetype: NetLinx fires are not recognized
Problem:  filetype: NetLinx fires are not recognized
Solution: Detect *.axs and *.axi as netlinx filetype
          (kb).

Reference:
- https://www.amx.com/en/site_elements/amx-language-reference-guide-netlinx-programming-language
- https://kielthecoder.com/2021/06/11/netlinx-getting-started/

closes: vim/vim#19249

6963e3b8bf

Co-authored-by: kb <kim@simple.industries>
2026-01-26 06:42:36 +08:00
zeertzjq
02760a30ce vim-patch:9.1.1908: tests: test_crash.vim times out in CI ASAN builds
Problem:  tests: test_crash.vim times out in CI ASAN builds
Solution: Increase timeout for ASAN or Valgrind runs

closes: vim/vim#18725

89f0a3a574

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-24 10:04:44 +08:00
zeertzjq
73f2286f08 vim-patch:9.1.1370: CI Tests favor GTK2 over GTK3
Problem:  CI Tests favor GTK2 over GTK3
Solution: Install GTK3 dependencies and debug packages for CI workflows,
          update ASAN suppression list, update required dependency
          checks for the tests (Drew Vogel)

closes: vim/vim#17253

ea67ba718d

Cherry-pick test_match.vim changes from patch 9.0.0626.

Co-authored-by: Drew Vogel <dvogel@github>
2026-01-24 10:04:44 +08:00
zeertzjq
08e193633b vim-patch:9.0.1480: using popup menu may leave text in the command line
Problem:    Using popup menu may leave text in the command line.
Solution:   Clear the command line if the popup menu covered it. (Luuk van
            Baal, closes vim/vim#12286)

dcd40cfca0

No code change is need in Nvim and testing is already covered by
test/functional/ui/popupmenu_spec.lua.

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2026-01-24 10:04:44 +08:00
zeertzjq
3ac981e838 vim-patch:9.0.1066: test function name is wrong
Problem:    Test function name is wrong.
Solution:   Rename to what is actually being tested. (closes vim/vim#11712)

67f3094397
2026-01-24 10:04:44 +08:00
zeertzjq
f60051e00d vim-patch:9.0.0874: using freed memory when executing unmenu at more prompt
Problem:    Using freed memory when executing unmenu at the more prompt.
Solution:   Do not clear menus while listing them. (closes vim/vim#11439)

920d311480

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-01-24 10:04:44 +08:00
zeertzjq
cc95a7d8b8 vim-patch:8.2.4738: Esc on commandline executes command instead of abandoning it
Problem:    Esc on commandline executes command instead of abandoning it.
Solution:   Save and restore KeyTyped when removing the popup menu.
            (closes vim/vim#10154)

11a57dfd16

No code change is needed in Nvim as Nvim doesn't call update_screen() to
redraw pum.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-01-24 10:04:44 +08:00
zeertzjq
e0b724de09 vim-patch:9.1.2105: tests: not enough tests for using plain_vgetc() (#37521)
Problem:  Not enough tests for using plain_vgetc().
Solution: Add tests for using plain_vgetc() during various commands.
          (zeertzjq)

closes: vim/vim#19236

2b6bdbc697
2026-01-24 00:04:33 +00:00
zeertzjq
f10a1dcf4d vim-patch:9.1.2107: :normal may change cmdline history (#37523)
Problem:  :normal may change cmdline history if the keys don't
          explicitly leave Cmdline mode (after 9.1.1872).
Solution: Check ex_normal_busy (zeertzjq)

closes: vim/vim#19237

85241020e8
2026-01-23 23:57:49 +00:00
zeertzjq
5a354db7fa vim-patch:9.1.2108: tests: Test_foldtextresult_rightleft() does not restore 'columns'
Problem:  Test_foldtextresult_rightleft() does not restore 'columns'
          (after v9.1.2102)
Solution: Save and restore the value of 'columns' (zeertzjq).

related: vim/vim#19220
closes:  vim/vim#19234

4fcbc70fb1
2026-01-24 06:56:50 +08:00
zeertzjq
cd624f24f6 vim-patch:9.1.2103: tests: test_fold.vim leaves swapfiles behind
Problem:  tests: test_fold.vim leaves swapfiles behind
Solution: Close open buffer using :bw! instead of :close!

10b272c126

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-24 06:56:09 +08:00
zeertzjq
b3242af187 vim-patch:9.1.2102: foldtext not reversed and cut off in 'rightleft' mode
Problem:  foldtext not reversed and cut off in 'rightleft' mode
          (bfredl)
Solution: Fix the rightleft redrawing logic (Sergey Vlasov)

fixes:  vim/vim#2659
closes: vim/vim#19220

b51ac5e378

Co-authored-by: Sergey Vlasov <sergey@vlasov.me>
2026-01-24 06:55:54 +08:00
zeertzjq
87276db7f9 vim-patch:9.1.2100: filetype: tiltfiles are not recognized (#37477)
Problem:  filetype: tiltfiles are not recognized
Solution: Detect Tiltfiles.* and *.tiltfiles as tiltfile  filetype.
          (Luis Davim)

Reference:
- https://docs.tilt.dev/api.html

fixes:  vim/vim#19214
closes: vim/vim#19218

ff0e5d994c

Co-authored-by: Luis Davim <luis.davim@gmail.com>
2026-01-21 07:34:51 +08:00
zeertzjq
64057d266c vim-patch:9.1.2098: Crash with 'wildmenu' when typing Ctrl-Y after Ctrl-A (#37466)
Problem:  Crash with 'wildmenu' when typing Ctrl-Y after Ctrl-A
          (after 9.1.1714) (fizz-is-on-the-way).
Solution: Check if there are matches before applying one (zeertzjq).

closes: vim/vim#19210

311b98d942
2026-01-19 23:36:57 +00:00
zeertzjq
b4e602dde5 vim-patch:9.1.2095: :wqall! doesn't quit when using :quit in BufWritePost
Problem:  :wqall! doesn't quit when using :quit in BufWritePost
          (after 8.0.1190).
Solution: Restore old value of "exiting" when calling not_exiting()
          instead of always resetting it to FALSE (zeertzjq).

related: vim/vim#2205
closes:  vim/vim#19212

e803ad1c56
2026-01-20 07:09:15 +08:00
zeertzjq
7470e63260 vim-patch:9.1.2097: TabClosedPre may be triggered twice for the same tab page
Problem:  TabClosedPre may be triggered twice for the same tab page when
          closing another tab page in BufWinLeave (after 9.1.1211).
Solution: Store whether TabClosedPre was triggered in tabpage_T
          (zeertzjq).

Also fix the inconsistency that :tabclose! triggers TabClosedPre after
a failed :tabclose, but :close! doesn't even if there is only one window
in the tab page.

closes: vim/vim#19211

9168a04e0c
2026-01-20 06:23:11 +08:00
zeertzjq
30bcb25341 vim-patch:9.1.2093: heap-use-after-free when wiping buffer in TabClosedPre
Problem:  heap-use-after-free when wiping buffer in TabClosedPre.
Solution: Check window_layout_locked() when closing window(s) in another
          tabpage (zeertzjq).

closes: vim/vim#19196

8fc7042b3d
2026-01-20 06:23:11 +08:00
zeertzjq
da20804a6a vim-patch:9.1.1325: tests: not checking error numbers properly
Problem:  tests: not checking error numbers properly.
Solution: Add a trailing comma to avoid matching a different error
          number with the same prefix (zeertzjq)

closes: vim/vim#17159

67fe77d272
2026-01-20 06:23:11 +08:00
zeertzjq
0d3ed7904a vim-patch:9.1.1211: TabClosedPre is triggered just before the tab is being freed
Problem:  TabClosedPre is triggered just before the tab is being freed,
          which limited its functionality.
Solution: Trigger it a bit earlier and also on :tabclose and :tabonly
          (Jim Zhou)

closes: vim/vim#16890

bcf66e0141

Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
2026-01-20 06:23:11 +08:00