Commit Graph

19892 Commits

Author SHA1 Message Date
zeertzjq
df21ac729c fix(terminal): losing output if BufFile* poll for events (#37580)
Problem:  Terminal loses output if a BufFilePre or BufFilePost autocmd
          polls for events.
Solution: Rename the buffer after allocating the terminal instance. Also
          fix buffer getting wrong name if BufFilePre uses NameBuff.
2026-01-28 06:21:28 +08:00
luukvbaal
1d57374c41 fix(ui): textlock still causes issues for UI callbacks #37513
Problem:  There are still ways to run into textlock errors with
          vim.ui_attach callbacks trying to display a UI event.
Solution: Disregard textlock again during vim.ui_attach() callbacks
          (also when scheduled). Partially revert 3277dc3b; avoiding
          to flush while textlock is set is still helpful.
2026-01-27 09:30:37 -05:00
github-actions[bot]
76c77bd114 docs: update version.c #37545
vim-patch:9.1.1988: osc52 package can be further improved
vim-patch:5fb29bb7e runtime(osc52): Update documentation, send DA1 query when loading package
vim-patch:e6a11d45e runtime(osc52): A few minor fixes
vim-patch:1d4fe8905 CI: Add C preproc indentation check to CI
vim-patch:a5ba252f0 runtime(doc): Tweak tag lines in vim9.txt
vim-patch:c035f518c CI: check encoding of runtime files with utf-8 name
2026-01-27 08:05:30 -05:00
zeertzjq
b88b7f9591 fix(terminal): wrong colors with nvim_open_term() in non-curbuf (#37579)
Problem:  Wrong colors with nvim_open_term() in non-current buffer.
Solution: Pass the buffer to get_config_string().
2026-01-27 06:59:23 +00:00
zeertzjq
9540e7470b fix(terminal): possible heap-use-after-free during Nvim exit
Usually, terminal_close() calls refresh_terminal(), which allocates the
scrollback buffer, and term_may_alloc_scrollback() in terminal_open()
won't dereference the buffer. However, refresh_terminal() is not called
during Nvim exit, in which case a heap-use-after-free may happen if
TermOpen wipes buffer. Check for non-NULL buf_handle to avoid that.
2026-01-27 13:12:15 +08:00
zeertzjq
b4039ec0b0 fix(terminal): don't allow b:term_title watcher to delete buffer 2026-01-27 12:45:49 +08:00
zeertzjq
b6befc7b03 fix(terminal): losing scrollback when TermOpen polls for events (#37573)
Problem:  When TermOpen polls for enough events to use the scrollback
          buffer, scrollback is lost until the next terminal refresh.
Solution: Allocate the scrollback buffer when it's needed.
2026-01-27 03:46:54 +00:00
luukvbaal
d30d91f3a4 fix(ui): only internal messages are unsafe #37462
Problem:  Fast context for msg_show event inhibits vim.ui_attach from
          displaying a stream of messages from a single command.

Solution: Remove fast context from msg_show events emitted as a result
          of explicit API/command calls. The fast context was originally
          introduced to prevent issues with internal messages.
2026-01-26 18:18:51 -05:00
luukvbaal
96e1acfa42 fix(messages): add "list_cmd" kind to :colorscheme #37561
Problem:  No kind for :colorscheme message.
Solution: Assign it the "list_cmd" kind.
2026-01-26 11:56:39 -05:00
glepnir
543e14d040 docs: nvim_set_hl fg_index, bg_indexed #37534 2026-01-26 08:31:57 -05:00
github-actions[bot]
0627b7902f docs: update version.c (#37212)
vim-patch:8.2.1857: Vim9: using job_status() on an unused var gives an error
vim-patch:8.2.2064: terminal: cursor is on while redrawing, causing flicker
vim-patch:8.2.3585: crash when passing float to "term_rows" of term_start()
vim-patch:8.2.3640: freeze when calling term_wait() in a close callback
vim-patch:8.2.3666: libvterm is outdated
vim-patch:8.2.3803: GUI: crash with 'writedelay' set using a terminal window
vim-patch:8.2.4695: JSON encoding could be faster
vim-patch:8.2.4699: hard to reproduce hang when reading from a channel
vim-patch:8.2.4757: list of libraries to suppress lsan errors is outdated
vim-patch:8.2.4788: large payload for LSP message not tested
vim-patch:8.2.4830: possible endless loop if there is unused typahead
vim-patch:8.2.5055: statusline is not updated when terminal title changes
vim-patch:9.0.0235: 'autoshelldir' does not work with chunked respose
vim-patch:9.0.0394: Cygwin: multibyte characters may be broken in terminal window
vim-patch:9.0.0524: build instructions for MS-Windows are outdated
vim-patch:9.0.0774: the libvterm code is outdated
vim-patch:9.0.1269: channel test often fails on Mac OS
vim-patch:9.0.1487: Content-type header for LSP channel not according to spec
vim-patch:9.0.1498: in a terminal window the cursor may jump around
vim-patch:9.0.1509: error message lacks mentioning the erroneous argument
vim-patch:9.0.1527: crash when using negative value for term_cols
vim-patch:9.0.1627: no generic mechanism to test syntax plugins
vim-patch:9.0.1628: syntax tests fail on FreeBSD
vim-patch:9.0.1692: Android not handling AI_V4MAPPED ai_flag
vim-patch:9.0.1790: Redundant LSP Content-Type header
vim-patch:b147d3148 tests: Improve the codestyle test (#12988)
vim-patch:9.0.1922: LSP server request message is misinterpreted as a response message
vim-patch:9.0.1927: patch 1916 (fixed terminal size) not optimal
vim-patch:9.0.1929: runtime tests fail with tiny vim
vim-patch:9.0.1939: still a problem when processing LSP RPC requests
vim-patch:4ae16d721 Improve CONTRIBUTING.md
vim-patch:74a233184 NSIS: Possibility to include translated license and README.txt files (#14311)
vim-patch:3ac83c714 The CODEOWNERS File is not useful
vim-patch:b7258738f runtime(doc): fix typo in usr_52.txt
vim-patch:f5c8f520b runtime(doc): fix typo in vim9script help file (#14782)
vim-patch:bad9577b9 runtime(doc): include some vim9 script examples in the help
vim-patch:98fb81846 runtime(comment): clarify the usage of 'commentstring' option value
vim-patch:9.1.0473: term_start() does not clear vertical modifier
vim-patch:9.1.0475: cmod_split modifier is always reset in term_start()
vim-patch:9d85d4dcf runtime(manpager): avoid readonly prompt
vim-patch:9.1.0606: tests: generated files may cause failure in test_codestyle
vim-patch:9.1.0639: channel timeout may wrap around
vim-patch:9.1.0643: terminal: cursor may end up on invalid position
vim-patch:166f89e04 runtime(doc): update vim90 to vim91 in docs
vim-patch:914213616 runtime(comment): add gC mapping to (un)comment rest of line
vim-patch:0fb25515c runtime(comment): fix syntax error
vim-patch:e021f39b7 runtime(comment): commenting might be off by one column
vim-patch:7b27fc49a runtime(comment): consider &tabstop in lines after whitespace indent
vim-patch:9.1.0763: tests: cannot run single syntax tests
vim-patch:f64bafd98 runtime(comment): fix commment toggle with mixed tabs & spaces
vim-patch:9.1.0787: cursor position changed when using hidden terminal
vim-patch:55adc5b46 runtime(doc): update coding style documentation
vim-patch:feea1b444 Add an .editorconfig file to repository
vim-patch:ba0b45857 translation(am): Remove duplicate keys in desktop files
vim-patch:de6a31301 runtime(doc): mention auto-format using clang-format for sound.c/sign.c
vim-patch:9.1.0989: Vim9: Whitespace after the final enum value causes a syntax error
vim-patch:9.1.1047: Makefiles uses non-portable syntax
vim-patch:9.1.1061: tests: test_glvs fails when unarchiver not available
vim-patch:7ceca3eb0 runtime(syntax-tests): Support "wait-free" test failure
vim-patch:9.1.1229: the comment plugin can be improved
vim-patch:20e46fa65 Improve contributing guide by adding a section on signing off commits
vim-patch:9.1.1240: Regression with ic/ac text objects and comment plugin
vim-patch:9.1.1254: need more tests for the comment plugin
vim-patch:9.1.1259: some issues with comment package and tailing spaces
vim-patch:9.1.1293: comment plugin does not handle 'exclusive' selection for comment object
vim-patch:9.1.1336: comment plugin does not support case-insensitive 'commentstring'
vim-patch:9.1.1348: still E315 with the terminal feature
vim-patch:55f9e2bef runtime(doc): Tweak documentation style in develop.txt
vim-patch:9.1.1399: tests: test_codestyle fails for auto-generated files
vim-patch:9.1.1456: comment plugin fails toggling if 'cms' contains \
vim-patch:aef2e53cf runtime(comment): handle special chars ^$[ robustly
vim-patch:1cbe3e89c runtime(comment): add <Plug>-mappings
vim-patch:9.1.1536: tests: test_plugin_comment uses wrong :Check command
vim-patch:58706ac04 Update editorconfig and the documented C-style for sign.c/sound.c
vim-patch:9.1.1597: CI reports leaks in libgtk3 library
vim-patch:46ec89902 runtime(doc): update develop assumptions
vim-patch:bc51ec53d runtime(doc): Update CONTRIBUTING and clarify use of Vim9 script
vim-patch:d1833d282 runtime(doc): allow more C99 features
vim-patch:0ed08788a runtime(doc): document use of proto files in develop.txt
vim-patch:05662b63b runtime(doc): Tweak spacing in develop.txt
vim-patch:e89efc22b runtime(doc): update Vim policy
vim-patch:fabe9a4c8 nsis: Getting the Vim version number via makensis
vim-patch:9.1.1841: patch 9.1.1840 adds python build dependency
vim-patch:bcf6c32b5 runtime(doc): Tweak documentation in develop.txt
vim-patch:9.1.1905: tabpanel: truncates terminal output
vim-patch:9.1.1912: tests: test_plugin_comment fails
vim-patch:ef7a577b2 runtime(doc): Remove outdated agide.org link
vim-patch:9.1.2025: conpty terminal process may not start
vim-patch:ce1636548 runtime(doc): Emphasize adding tests when contributing
vim-patch:d09be1584 runtime(doc): Update Contributing.md on the use of AI
vim-patch:9.1.2039: if_ruby: crash when using Ruby/dyn 4.0
vim-patch:0115da33b CI: Missing test of Vim with ConPTY on Windows
vim-patch:9.1.2047: MS-Windows: style issue in gui_w32.c
vim-patch:9.1.2048: MS-Windows: backspace behavior wrong with ConPTY
vim-patch:9.1.2053: MS-Windows: May use wrong find command
vim-patch:0ed8ba307 Always force LF line endings in old test .ok files
vim-patch:a735e44b3 translation(ru): updated menu files according to the patch 9.1.1989
vim-patch:416d1a5e2 translation(ru): added a disclaimer to the license translation
vim-patch:0084e4bd1 gitattributes: mark test21.ok binary, drop test42.in
vim-patch:aa58f1fe4 CI: build failure in if_perl.xs
vim-patch:9.1.2065: GvimExt cannot be linked statically using MinGW
vim-patch:5516fc534 runtime(syntax-tests): Adapt "runtime/syntax/testdir/vimcmd" for "src/testdir/util/shared.vim"
vim-patch:9.1.2073: auto/configure needs to be regenerated
vim-patch:9.1.2074: Compile error with Motif GUI
vim-patch:da44ef6a9 runtime(c,cpp): Add reference links to noreturn tests
vim-patch:8211f556d runtime(syntax-tests): tests: sh_10 fails on MacOS runners
vim-patch:9.1.2091: Ruby integration does not work correctly
vim-patch:9.1.2096: Vim9: truthiness issue with objects
vim-patch:9.1.2099: different line endings in ja.sjis.po and ja.po
vim-patch:284f8669e CI: Reorder path in Windows CI runners and move Python3 before $PATH
vim-patch:9.1.2101: Vim9: more truthiness issues

vim-patch:8.2.0572: using two lines for free and reset
vim-patch:8.2.2291: Vim9: cannot use "null" for v:null
vim-patch:8.2.2961: keys typed during a :normal command are discarded

vim-patch:9.0.1567: profiler calculation may be wrong on 32 bit builds
vim-patch:9.0.1776: No support for stable Python 3 ABI
vim-patch:9.0.1859: heap-use-after-free in bt_normal()
vim-patch:9.0.2052: win32: using deprecated wsock32 api

vim-patch:9.1.2052: Compile error when disabling linebreak feature
vim-patch:5e37e31: runtime(tutor): fix wrong motion in instruction
vim-patch:9.1.2067: shadow variable warning in menu.c
vim-patch:f78629b: runtime(doc): Fix typo at :help 'fsync'
2026-01-25 09:57:34 +08:00
zeertzjq
72ac9ac9a1 fix(terminal): possible memory leak on exit (#37532)
Problem:
On exit, it's possible that term_delayed_free() hasn't been called yet
when the main loop is freed, in which case it won't be called ever.

Solution:
Don't bail out with term->destroy set when calling terminal_close()
inside free_all_mem().
2026-01-24 03:32:52 +00: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
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
glepnir
589232c0e0 fix(extmark): wrong eol_right_align width calculation (#37034)
Problem: Multiple eol_right_align virtual texts with different widths
are incorrectly positioned. The lookahead loop uses `item` instead of
`lookaheadItem` when checking kind and accessing data, causing all
items to use the first item's width.

Solution: Use `lookaheadItem->kind` and `lookaheadItem->data.vt`
instead of `item->kind` and `item->data.vt` in the lookahead loop.
2026-01-23 08:35:43 +00:00
zeertzjq
cae4fbf973 vim-patch:3456303: check.vim: Use silent command modifier
Problem:  When checking a .po file (make -C src/po check), errors are not
          displayed.

Solution: Adding "silent" to some normal commands in check.vim
          suppresses unnecessary output (Muraoka Taro)

This is because the output of check.vim is redirected to /dev/null.
However, if you stop the redirection, check.vim generates a lot of
output and becomes very slow.

When these commands are run in ex mode, they output the contents of the
line the cursor is pointing to.  This caused a lot of output.

closes: vim/vim#19227

3456303430

Co-authored-by: Muraoka Taro <koron.kaoriya@gmail.com>
2026-01-22 13:41:01 +08:00
zeertzjq
5f86b4b70d vim-patch:4105ef1: Drop superfluous execute permissions for readable files
- runtime/ftplugin/plsql.vim (42e498)
- runtime/pack/dist/opt/editorconfig/LICENSE.PSF (e5e043)
- src/po/check.vim (96dab9)
- src/po/it.po (bb0d3b)

closes: vim/vim#18666

4105ef16e3

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2026-01-22 13:40:37 +08:00
zeertzjq
965f54cf50 vim-patch:96dab9c: check.vim: Further improve po message checks
96dab9c9b1

Co-authored-by: Antonio Giovanni Colombo <azc100@gmail.com>
2026-01-22 13:39:45 +08:00
zeertzjq
e27e4052c8 vim-patch:2566a9f: check.vim: Improve po message checks
2566a9f290

Co-authored-by: Antonio Giovanni Colombo <azc100@gmail.com>
2026-01-22 13:39:16 +08:00
zeertzjq
282a794feb vim-patch:41adebe: check.vim: detect trailing whitespace
41adebe572

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-22 13:36:57 +08:00
zeertzjq
5e6f0e58ed vim-patch:32a5faa: check.vim complains about overlong comment lines
Problem:  check.vim complains about overlong comment lines
Solution: only check the length of non-commented lines

32a5faa6d7

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-22 13:35:32 +08:00
zeertzjq
95b6215f0a vim-patch:c858382: Problem: Commit 6f585d breaks CI
Problem:  Commit 6f585d breaks CI
Solution: Don't error out, simply return an error message.

c858382482

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-22 13:35:09 +08:00
zeertzjq
fc4188ded8 vim-patch:6f585da: Overlong translation files may cause repo to become "dirty"
Problem:  Overlong translation files may cause repo to become "dirty"
Solution: Add a test into check.vim to warn for lines being longer than
          80 virt columns

related: vim/vim#14490

6f585da00b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-22 13:34:52 +08:00
zeertzjq
196df35cca fix(terminal): <Ignore> should be no-op (#37494) 2026-01-22 09:26:22 +08:00
zeertzjq
25ce44845d fix(terminal): restore options properly when switching buffer (#37485) 2026-01-21 18:42:47 +08:00
glepnir
c556972ae1 fix(api): auto-load buffers in nvim_buf_set_* operations (#35046)
fix(api): auto-load buffers in nvim_buf_set_* operations

Problem: Setting marks, lines, or text on unloaded buffers fails because
ml_line_count is not accurate until the buffer is loaded.

Solution: Add require_loaded_buffer() helper and use it in write operations
(nvim_buf_set_lines, nvim_buf_set_text, nvim_buf_set_mark). These now
auto-load buffers as needed.
2026-01-21 14:17:44 +08:00
zeertzjq
1949452bd3 fix(tui): avoid using uv_pipe_t as uv_tty_t (#37479)
Check tui->out_isatty before accessing tui->output_handle.tty.
2026-01-21 11:53:18 +08:00
Tommy Guo
103ddaf9ae fix(lua): correct line number reporting for options set in coroutines (#37463) 2026-01-21 02:18:33 +00:00
James Fotherby
bfe9fa0f8e fix(socket): remove stale socket files (#37378)
Problem:
Crashed Nvim leaves socket files. Subsequent starts fail with "address already in use".

Solution:
On bind failure, test socket liveness via connect(). Remove if stale, retry bind().

Fixes #36581
2026-01-20 13:59:43 +08:00
glepnir
0712a9c87b fix(pum): separate scrollbar from shadow border (#37448)
Problem:
With shadow border, scrollbar and border overlap. Shadow's right border
starts from the second row (offset by 1), but scrollbar renders on every
row including the first. If they share a column, the first row shows
scrollbar where shadow hasn't started yet, causing misalignment.

Solution:
Separate scrollbar from the shadow's right border.
2026-01-19 19:39:48 -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
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
zeertzjq
e3990f8643 vim-patch:9.1.1202: Missing TabClosedPre autocommand
Problem:  Missing TabClosedPre autocommand
          (zoumi)
Solution: Add the TabClosedPre autcommand (Jim Zhou).

fixes: vim/vim#16518
closes: vim/vim#16855

5606ca5349

Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
2026-01-20 06:23:11 +08:00
luukvbaal
8bdfd286e5 fix(messages): adjust msg_show "empty" kind logic (#37427)
Problem:  A message ending in an unprintable character may emit a
          msg_show event with the "empty" kind. No empty message event
          for echom "".
Solution: Adjust conditions for emitting "empty" msg_show events.
2026-01-19 17:15:44 +01:00
Emanuel Krollmann
f36dd7557a fix(autocmd): heap UAF with :bwipe in Syntax autocmd
Problem:
Creating an autocommand which executes `:bwipe` on the Syntax event
causes a heap-use-after-free.

Solution: set BF_SYN_SET flag before applying autocommands
2026-01-18 17:56:34 +00:00
glepnir
5a65321684 fix(pum): text overflows into border on truncation (#37438)
Problem:
When text is too long, it overflows into the border. This happens because
grid_line_maxcol includes border columns, so grid_line_puts can write
there.

Solution:
Truncate string to available width when need_fcs_trunc is set.
2026-01-18 08:55:30 +00:00
zeertzjq
41068c77aa fix(normal): assertion failure with "gk" in narrow window (#37444)
When width1 and width2 are negative the assertion may fail. It seems
that adding a negative value to w_curswant won't cause any problems, so
just change the assertion.
2026-01-18 11:46:13 +08:00
Sean Dewar
a5e5ec8910 fix(api): parse_expression crash with unopened ] and node
Problem: nvim_parse_expression null pointer dereference with unmatched ]
followed by a node.

Solution: if ast_stack was empty, set new_top_node_p to top of the stack after
pushing the list literal node; similar to what's done for curlies.

This bug was originally found by a Matrix user, but I couldn't remember how to
trigger it... Ran into the other crash while finding a repro. :P
2026-01-17 13:22:55 +00:00
Sean Dewar
5226801be2 fix(api): parse_expression crash with ident and curly
Problem: nvim_parse_expression null pointer dereference when parsing an
identifier followed by { with "highlight" parameter set to false.

Solution: only set opening_hl_idx if pstate->colors is not NULL.

Not added to parser_tests.lua as that uses highlight = true.
2026-01-17 13:22:55 +00:00
zeertzjq
f3cfe9a94b vim-patch:8.2.0371: crash with combination of terminal popup and autocmd (#37433)
Problem:    Crash with combination of terminal popup and autocmd.
Solution:   Disallow closing a popup that is the current window.  Add a check
            that the current buffer is valid. (closes vim/vim#5754)

cee52204ca

Cherry-pick related changes from patch 9.0.1454.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-01-17 11:53:58 +00:00
zeertzjq
960cba7b3b vim-patch:9.1.2090: Last buffer not freed with EXITFREE
Problem:  Last buffer not freed with EXITFREE (after 9.1.2087).
Solution: Free the last buffer when inside free_all_mem()
          (zeertzjq).

This isn't really a memory leak, as the last buffer's memory is still
reachable via pointers like firstbuf and lastbuf. But it's possible that
this may cause false ASAN warnings in the future, which is what EXITFREE
is supposed to prevent.

closes: vim/vim#19194

6c118afeaa
2026-01-17 18:37:48 +08:00
zeertzjq
eb5a7cc0dd vim-patch:9.1.2087: Crash when using :tabonly in BufUnload
Problem:  Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
          buffer if there are no other buffers. Don't decrement
          b_nwindows if it was 0 before buf_freeall() (zeertzjq).

fixes:  vim/vim#19088#issuecomment-3710172769
closes: vim/vim#19186

fa64f92f6a
2026-01-17 18:37:47 +08:00
zeertzjq
e51f5e17e1 vim-patch:9.0.0909: error message for layout change does not match action (#37436)
Problem:    Error message for layout change does not match action.
Solution:   Pass the command to where the error is given. (closes vim/vim#11573)

9fda81515b

Thinking about this again, it's actually OK to check split_disallowed in
window_layout_locked(), so add the check.
Also add missing window_layout_locked() in tabpage_close().

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-01-17 10:58:26 +08:00
zeertzjq
03494ad048 vim-patch:9.1.2088: Redundant NULL checks in find_pattern_in_path() (#37432)
Problem:  Redundant NULL checks in find_pattern_in_path().
Solution: Remove the NULL checks. Also fix typos in test_diffmode.vim
          (zeertzjq).

After assigning to inc_opt on line 2976, it's dereferenced immediately,
and not assigned another value afterwards, so checking for NULL after
line 2977 is redundant.

closes: vim/vim#19185

ce394b13e9
2026-01-17 06:34:34 +08:00
zeertzjq
dde914f926 Merge pull request #37422 from zeertzjq/vim-9.1.0059
vim-patch:9.1.{0059,0117,0671,1043,partial:1110}: WinNewPre
2026-01-16 16:18:02 +08:00
bfredl
4f44705a47 Merge pull request #37189 from bfredl/zigsafe
ci: test -Doptimize=ReleaseSafe
2026-01-16 09:14:54 +01:00
zeertzjq
786c5fbdec vim-patch:9.1.0671: Problem: crash with WinNewPre autocommand
Problem:  crash with WinNewPre autocommand, because window
          structures are not yet safe to use
Solution: Don't trigger WinNewPre on :tabnew

fb3f969936

Cherry-pick doc updates from latest Vim runtime.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-16 15:55:34 +08:00