Commit Graph

36869 Commits

Author SHA1 Message Date
marvim
887f3bca0b docs: update version.c
vim-patch:9.2.0641: GTK4: crash in gui_mch_menu_hidden()
vim-patch:47bb4bed4 editorconfig: don't change spaces to tabs in git commit message
vim-patch:9.2.0644: popup image: duplicate sync-output code
vim-patch:9.2.0646: GTK3 GUI slow on HiDPI/4K with software rendering
2026-06-15 04:41:04 +00:00
zeertzjq
63d89afc4c vim-patch:9.2.0642: statusline: buffer overflow with item groups (#40253)
Problem:  statusline: buffer overflow with item groups
Solution: Fix the issues (see below) (Sébastien Hoffmann)

Fix various buffer overflow bugs (examples assume MAXPATHL==4096):
- truncated item groups where minwid>maxwid:
    vim --clean +"set ls=2 stl=%<%{%repeat('x',4096-11)%}%50.5(12🙂345%)"
  leads to fillchars spilling over the end of the group/buffer while trying to
  compensate for truncating at a multicell character because minwid<=maxwid is assumed
- left-aligned item groups with multi-byte fillchar:
    vim --clean +"set ls=2 fillchars+=stl:∙ stl=%<%{%repeat('x',4096-3)%}%-2(X%)"
  wrongly leads to padding at the end of the statusline and `p-out==4097`
  because the bounds check assumes a 1-byte fillchar
- right-aligned item groups with 1-byte fillchar:
    vim --clean +"set ls=2 stl=%<%{%repeat('x',4096-4)%}%4(XY%)"
  leads to "YX" instead of "XY" at the end of the statusline
  because `memmove` is done before adjusting the offset
- right-aligned item groups with multi-byte fillchar:
    vim --clean +"set ls=2 fillchars+=stl:∙ stl=%5(X%)"
  leads to "∙∙∙∙<e2>", i.e. the fillchar is being written over the group contents
  and eventually being overwritten itself at the second byte with the final NUL,
  because the padding counter assumes a 1-byte fillchar; to crash vim,
    vim --clean +"set ls=2 fillchars+=stl:∙ stl=%<%{%repeat('x',4096-149)%}%50(X%)"

related: neovim/neovim#40219
closes:  vim/vim#20522

d249884340

Co-authored-by: Sébastien Hoffmann <contact@shoffmann.dev>
2026-06-15 10:40:25 +08:00
zeertzjq
ff6930a646 Merge pull request #40252 from zeertzjq/vim-9.2.0629
vim-patch:9.2.{0629,0645}
2026-06-15 08:52:06 +08:00
zeertzjq
2fe91d0225 vim-patch:9.2.0645: Composing chars no longer accepted in end-id abbr
Problem:  Composing chars are no longer accepted in end-id abbreviation
          (after 9.2.0629).
Solution: Unescape all chars using vim_unescape_csi() instead of using
          mb_unescape() on individual chars, so that mb_ptr2len() and
          MB_PTR_ADV() can still be used.

closes: vim/vim#20514

23a84d28a8
2026-06-15 08:15:26 +08:00
zeertzjq
0c63e41b5d vim-patch:9.2.0629: 0x80 and 0x9b byte not unescaped when check for valid abbr
Problem:  0x80 and 0x9b byte not unescaped when checking for valid abbr
          (Mao-Yining)
Solution: Use mb_unescape() (zeertzjq).

fixes:  vim/vim#20506
closes: vim/vim#20508

1958c991a8
2026-06-15 08:06:30 +08:00
Igor Lacerda
8b5d80ab44 feat(events): :mksession SessionWritePre event #39688
Problem:
No event triggered just before writing a session file.

Solution:
Add `SessionWritePre`.
2026-06-14 17:04:46 -04:00
Justin M. Keyes
7e0047abb4 Merge #40237 surface autoread activity via 'busy' flag 2026-06-14 16:34:30 -04:00
Justin M. Keyes
d34cfe1cb8 fix(autoread): handle autocmd errors
Problem:
Any random ftplugin or other autocmd, can throw an error when
`:checktime` reloads a buffer. This causes a trace which makes it look
like an issue with `autoread.lua`.

    vim.schedule callback: …/runtime/lua/nvim/autoread.lua:146:
    FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20] ..script
    …/runtime/ftplugin/help.lua: Vim(runtime):E5113: Lua chunk:
    …/runtime/lua/vim/treesitter.lua:216: Index out of bounds
    stack traceback:
    [C]: in function 'nvim_buf_get_text'
    …/runtime/lua/vim/treesitter.lua:216: in function 'get_node_text'
    …/runtime/lua/vim/treesitter/query.lua:558: in function 'handler'
    …/runtime/lua/vim/treesitter/query.lua:843: in function '_match_predicates'
    …/runtime/lua/vim/treesitter/query.lua:1082: in function '(for generator)'
    …/runtime/ftplugin/help.lua:91: in function 'runnables'
    …/runtime/ftplugin/help.lua:124: in main chunk
    [C]: in function 'checktime'
    …/runtime/lua/nvim/autoread.lua:146: in function <…/runtime/lua/nvim/autoread.lua:138>

Solution:
Use pcall() and surface the error via nvim_echo.
2026-06-14 22:00:38 +02:00
Justin M. Keyes
2abb9785d3 feat(autoread): surface autoread activity via 'busy' flag
Problem:
Old 'autoread' only did `:checktime` on focus-change and shell (":!")
commands, and only for non-hidden buffers. Since 'autoread' is now
driven by OS filewatcher events, buffers are updated much more eagerly.
This should be surfaced to the user somehow, either via a carefully
placed notification, or a minimal UI indicator.

A "notification" would be noisy, unless it is conditional on specific
circumstances (e.g. when "many" buffers are updated).

Solution:
Use the existing 'busy' buffer-local option as a subtle hint about
activity.
2026-06-14 22:00:38 +02:00
Justin M. Keyes
f350e39b77 fix(xxd): signed left-shift overflow in -r mode #40246
(AI-assisted)

Problem:
Zig build failing since 966e7a98f5:

    FAILED   ...r/work/neovim/neovim/test/functional/editor/xxd_spec.lua @ 22: xxd handles long lines in revert mode
    Expected values to be equal.
    Expected:
    0
    Actual:
    134
    stack traceback:
    ...r/work/neovim/neovim/test/functional/editor/xxd_spec.lua:26: in function <...r/work/neovim/neovim/test/functional/editor/xxd_spec.lua:22>

`huntype` parses the address column by repeatedly left-shifting
`want_off` (a signed `long`) by 4 bits per hex digit. After 16 hex
digits the value occupies all 64 bits; the next shift moves a non-zero
bit into the sign bit -- signed overflow, i.e. undefined behavior.

This happens on the Zig build because it enables UBSAN. The bug was
pre-existing, but 966e7a98f5 added a test that exercises it.

Solution
Shift through `unsigned long` and cast back to `long`, making the
overflow well-defined wrap-around.
2026-06-14 16:00:05 -04:00
Justin M. Keyes
6f3446c970 Merge #40087 from ofseed/pos-util-follow-up
feat(pos): create a cursor position by using the current of a window
2026-06-14 12:42:52 -04:00
Justin M. Keyes
4c3b0ecb46 fix(cliff): strip "backport:" prefix from commit subject #40243
Problem:
Backport commits may have subjects like "backport: fix(ui): ...".
(e.g. ecda67662f). git-cliff treats them as OTHER.

Solution:
Preprocess the subject to strip a leading "backport:" or "backport ".
2026-06-14 12:00:37 -04:00
Vadim Misbakh-Soloviov
224ad8a538 fix(tui): more compatible way to reset cursor #40234
Problem:
All (tested by me) terminals (xterm, st, ghostty, vte, foot, wezterm, konsole) do support `\x1b[0 q` as "reset cursor to default", but at least konsole and wezterm only understands `\x1b[0 q` as "reset to default", but have different behaviour on `\x1b[ q` (konsole sets "steady block", and wezterm does nothing (do not change cursor shape).

Solution:
Use `\x1b[0 q` would be more widely compatible "reset" sequence than `\x1b[ q`

P.S. actually, `xterm`, `ghostty` and `st` (with default config.h) sets "steady block" for both sequence, but still here `[0` behaves the same as `[`
2026-06-14 11:43:44 -04:00
OrbisAI Security
966e7a98f5 fix(xxd): buffer overread #40236
Problem
Buffer overflow if lines exceed the expected buffer size.

Solution:
Use snprintf instead of strcpy.
2026-06-14 11:16:02 -04:00
jdrouhard
3d6393540e feat(lsp): use LspNotify for semantic tokens #40224
Problem: The semantic token module is using its own debounce timer for
the buffer on_lines event. If its internal debounce is shorter than the
changetracking module's debounce, it's possible for semantic token
requests to fire for changed buffers before the textDocument/didChange
notification is sent to the server.

Solution: Trigger semantic token requests from the LspNotify autocmd
when the method is the didChange or didOpen notifications, which
enforces a strict happens-before relationship for the sync change
notification followed by a semantic token request.

Note: There is still an internal debounce mechanism in the semantic
token module to handle other debouncing needs specific to its
functionality, such as debouncing server refresh notifications and
handling WinScrolled events when using range requests.
2026-06-14 11:10:59 -04:00
github-actions[bot]
c37aacb426 docs: update version.c #40231
vim-patch:9.2.0626: Vim9: illegal characters allowed in dict key names with dot notation
vim-patch:9.2.0630: popup images: kitty images output in GUI mode
vim-patch:7bc4491ad CI: Bump the github-actions group across 1 directory with 3 updates
vim-patch:9.2.0634: GTK4: no minimum resize limit
vim-patch:ad8d21b14 runtime(syntax-tests): Rename test files on demand

vim-patch:8.1.2076: crash when trying to put a terminal in a popup window

vim-patch:8.2.1090: may use NULL pointer when skipping over name
vim-patch:8.2.1755: Vim9: crash when using invalid heredoc marker
vim-patch:8.2.1854: Vim9: crash when throwing exception for NULL string
vim-patch:8.2.1884: compiler warning for uninitialized variable
vim-patch:8.2.1924: Vim9: crash when indexing dict with NULL key
vim-patch:8.2.2292: Vim: expr test fails
vim-patch:8.2.3340: accessing uninitialized pointer
vim-patch:8.2.3359: Vim9: error for type when variable is not set
vim-patch:8.2.3396: when libcall() fails invalid pointer may be used
vim-patch:8.2.4000: Coverity warns for checking for NULL pointer after using it
vim-patch:8.2.4269: Coverity warns for using a NULL pointer
vim-patch:8.2.4539: when comparing special v:none and v:null are handled the same
vim-patch:8.2.4822: setting ufunc to NULL twice

vim-patch:9.0.1095: using freed memory when declaration fails
vim-patch:9.0.1375: crash when getting member of obj of unknown class
2026-06-14 07:15:30 -04:00
glepnir
2e8c60cb38 vim-patch:9.2.0624: C-N/C-P cannot be mapped in complete() completion (#40232)
Problem:  Keys valid in CTRL-X mode are never mapped while insert
          completion is active, so <C-N> and <C-P> cannot be remapped
          for completion started by complete().
Solution: Do not disable mappings in CTRL_X_EVAL mode.  In this mode a
          mapping cannot interfere with selecting the completion
          method, which is what the no-mapping rule exists for.

related: vim/vim#6440
related: vim/vim#16880
closes:  vim/vim#20489

076585e6ad

Co-authored-by: Thomas M Kehrenberg <tmke8@posteo.net>
2026-06-14 05:15:07 +00:00
zeertzjq
3e300b0deb vim-patch:9.2.0635: checking the syntax contains/cluster list is slow (#40230)
Problem:  Deciding whether a group is in a "contains"/cluster list scans
          the list and expands clusters on every check, which is slow for
          syntaxes with large lists (e.g. plugins such as netrw).
Solution: Resolve each list once into a sorted, cluster-expanded set of
          group IDs and use a binary search; cache it per syntax block and
          drop the cache when syntax definitions change (Hirohito Higashi).

closes: vim/vim#20490

48fbae4378

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-14 03:40:59 +00:00
zeertzjq
e997599894 vim-patch:9.2.0640: the "%" command jumps to parens and braces inside comments (#40229)
Problem:  The "%" command jumps to parens and braces inside comments,
          unlike the "=" operator (cindent), which ignores them.
Solution: When 'comments' defines C-style comments and "%" is not in
          'cpoptions', skip matching parens inside such comments, except
          when the cursor is inside a comment so a match there can still
          be found.

fixes:   vim/vim#20329
related: vim/vim#20111
closes:  vim/vim#20491

b8a109dcfb

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 10:52:50 +08:00
zeertzjq
710431c696 Merge pull request #40228 from zeertzjq/vim-ff7fcb8
vim-patch: runtime file updates
2026-06-14 10:02:39 +08:00
zeertzjq
8ea5747f6d vim-patch:1fee3cd: runtime(beancount): Include Beancount runtime files
Include with adjustments from the upstream repo:
https://github.com/nathangrigg/vim-beancount

closes: vim/vim#20373

1fee3cd4b9

Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
2026-06-14 09:37:00 +08:00
zeertzjq
439a8d9714 vim-patch:ff7fcb8: runtime(pfmain): Add smtp_destination_rate_delay to syntax script
closes: vim/vim#20505

ff7fcb8f01

Co-authored-by: Leo Feyer <1192057+leofeyer@users.noreply.github.com>
2026-06-14 09:31:54 +08:00
glepnir
ff0352fd4f vim-patch:9.2.0639: gq with 'formatprg' fails on an empty buffer (#40226)
Problem:  gq (and other filters) on an empty buffer fail with
          "E20: Mark not set": when the filter produces no output,
          do_filter() still subtracts the line count from '[ and '],
          pushing '] to line 0.
Solution: when the filter produces no output, put '[ and '] on a valid
          line instead of subtracting past line 1 (glepnir).

related: neovim/neovim#30593
closes:  vim/vim#19061

aefbca2977
2026-06-14 08:45:16 +08:00
Justin M. Keyes
37239e724e Merge #40220 from justinmk/fixautoread 2026-06-13 17:37:08 -04:00
Justin M. Keyes
aeea633deb test(autoread): make "debounce" test actually valid 2026-06-13 20:55:49 +02:00
Justin M. Keyes
1d33a81751 test(autoread): cleanup
- Merged into the main "reloads on external change" test.
- Reduce duplication.
- Wall-clock down from ~4.4s to ~1.4s (dropped 3s debounce test).
2026-06-13 20:54:00 +02:00
Sébastien Hoffmann
e36659c82f fix(statusline): prevent various buffer overflows with item groups #40219
Problem:

Various out-of-bounds writes inherited from vim (examples assume MAXPATHL==4096):
- truncated item groups where minwid>maxwid:
    nvim --clean +"set stl=%<%{%repeat('x',4096-11)%}%50.5(12🙂345%)"
  leads to fillchars spilling over the end of the group/buffer while trying to
  compensate for truncating at a multicell character because minwid<=maxwid is assumed
- left-aligned item groups with multi-byte fillchar:
    nvim --clean +"set fillchars+=stl:∙ stl=%<%{%repeat('x',4096-3)%}%-2(X%)"
  wrongly leads to padding at the end of the statusline and `out_p-out==4097`
  because the bounds check assumes a 1-byte fillchar
- right-aligned item groups with 1-byte fillchar:
    nvim --clean +"set stl=%<%{%repeat('x',4096-4)%}%4(XY%)"
  leads to "YX" instead of "XY" at the end of the statusline
  because `memmove` is done before adjusting the offset
- right-aligned item groups with multi-byte fillchar:
    nvim --clean +"set fillchars+=stl:∙ stl=%5(X%)"
  leads to "∙∙∙∙<e2>", i.e. the fillchar is being written over the group contents
  and eventually being overwritten itself at the second byte with the final NUL,
  because the padding counter assumes a 1-byte fillchar; to crash Neovim,
    nvim --clean +"set fillchars+=stl:∙ stl=%<%{%repeat('x',4096-149)%}%50(X%)"

Solution:
Clearer variable names and no recycling of variables for different purposes.
2026-06-13 13:57:01 -04:00
Evgeni Chasnovski
e9b9426d7d fix(filetype): vim.filetype.match fails if CWD goes missing #40190
Problem: Running `vim.filetype.match()` when current working directory
  was removed from disk throws a `vim.fs.abspath` assertion error.
  However, the matching might still be possible without trying to match
  against full path (like if it is a known extension).

Solution: Safely compute absolute path and ignore it if it errors.
2026-06-13 13:20:45 -04:00
luukvbaal
736f914c7b fix(mouse): click on "below" virtual lines #40217
Problem:  Clicking on a "below" virtual line interacts with the line
          it is attached to for decor/drawing purposes, rather than
          the line the extmark is placed at.
Solution: Account for "below" virtual lines when computing mouse line number.
2026-06-13 12:56:42 -04:00
altermo
67378bfb5a test(undotree): flaky tests #40218
Problem:
After 400f247397 the undotree test became flaky.

It seems to be caused by some kind of race condition where an entry in the undotree is not added when a change in the buffer happens (adding a bunch of sleep around buffer-change operations seems to fix the issue).

Solution:
Disable autoread plugin in undotree test.
2026-06-13 12:49:18 -04:00
John Reid
d52ebe317d feat(diagnostic): add virt_lines_overflow option for virtual_lines #40178
Problem: Diagnostic virtual lines are hardcoded with "scroll" for
virt_lines_overflow option.

Solution: Add a `overflow` option to `virtual_lines` config
to support "wrap", "scroll", "trunc", and "auto".
2026-06-13 04:20:20 -04:00
Jan Edmund Lazo
c5d467323e vim-patch:9.1.0387: Vim9: null value tests not sufficient #40215
Problem:  Vim9: null value tests not sufficient
Solution: Add a more comprehensive test for null values
          (Yegappan Lakshmanan)

closes: vim/vim#14701

da9d345b3d

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2026-06-13 04:06:03 -04:00
github-actions[bot]
2c3c6bc7e3 docs: update version.c #40108
vim-patch:9.1.0053: MS-Windows: Key event test still fails
vim-patch:9.1.0057: MS-Windows: Key event test still fails
vim-patch:9.2.0540: tests: Test_mswin_event_mouse is flaky
vim-patch:9.2.0590: GTK4: drawing area loses focus shape on popup menu open
vim-patch:9.2.0595: MS-Windows: Wrong buffer size calculation for gvimext
vim-patch:9.2.0599: popup: title set with popup_setoptions() is not shown
vim-patch:057db5f7e CI: Bump actions/checkout in the github-actions group across 1 directory
vim-patch:48f2e78c8 runtime(doc): Add gtk4-slow doc tag
vim-patch:9e4042b2b translation(it): Update Italian man page
vim-patch:9.2.0604: tests: Test_mswin_event_mouse() is still flaky
vim-patch:9.2.0607: GTK4: inputdialog() does not work as expected
vim-patch:9.2.0613: tests: test_xxd_color2() checks for dash but uses sh
vim-patch:9.2.0616: GTK4: use-after-free on clipboard read timeout
vim-patch:9.2.0617: GvimExt: does not support different runtime dirs
vim-patch:9.2.0618: use-after-free in popup_getoptions() on dict_add() failure
vim-patch:9.2.0619: integer overflow in popup image size validation
vim-patch:0abffbff2 CI: Remove Cirrus CI and Coverity Scan

vim-patch:8.2.2583: Vim9: cannot compare result of getenv() with null
vim-patch:8.2.4087: cannot test items from an autoload script easily
vim-patch:8.2.4534: Vim9: "is" operator with empty string and null returns true

vim-patch:9.0.1674: help for builtin functions is not sorted properly
vim-patch:9.0.1727: minor problems with the teapot
vim-patch:9.0.1796: Vim9 problems with null_objects
vim-patch:9.0.1914: Vim9: few issues when accessing object members
vim-patch:9.0.2001: Vim9: segfault with islocked()

vim-patch:9.1.0385: Vim9: crash with null_class and null_object
vim-patch:9.1.0391: Vim9: could improve testing
vim-patch:9.1.0620: Vim9: segfauls with null objects
vim-patch:9.1.1865: tests: do not notice lines containing only a tab
vim-patch:9.1.2029: tests: the test_vim9_class.vim testfile is too long

vim-patch:9.2.0195: CI: test-suite gets killed for taking too long
2026-06-13 03:59:45 -04:00
Oleksandr Chekhovskyi
400f247397 feat(autoread): use filewatchers for OS-driven change detection #37971
Problem:
The 'autoread' option only checks for file changes reactively — on
FocusGained, :checktime, CmdlineEnter, etc. — by polling timestamps.
External changes are not detected until the user interacts with Neovim.

Solution:
Add a core module (runtime/lua/nvim/autoread.lua) enabled from
runtime/plugin/autoread.lua that watches each buffer's file using
vim._watch.watch() (libuv fs_event). On change detection it calls
:checktime, which invokes the existing buf_check_timestamp() logic
for reload/prompt handling. Watchers are managed via autocmds tied
to buffer lifecycle events and respect the 'autoread' option (global
and buffer-local).
2026-06-12 18:25:15 -04:00
Justin M. Keyes
c622b454b5 Merge #40086 fix(tui): keep synchronized output active across partial flushes 2026-06-12 13:20:39 -04:00
tao
f81da18c3a fix(stdpath): avoid DOS 8.3 filenames for "cache", "run" #40201
Problem:
stdpath() may return a DOS 8.3 "shortened" filename, because Windows
truncates long usernames into `6ch~N` names in `TEMP/TMP` env vars.
We don't want to "leak" them into Nvim.

Solution:
For "run", pass `true` to `vim_FullName` to expand 8.3 filenames.
For "cache", call `os_realpath` to expand 8.3 filenames.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-06-12 11:03:23 -04:00
Justin M. Keyes
baabb7ab6f test: mark non-actionable tests as N/A #40207
Problem:
Listing individual "skipped" notices for each non-actionable or
NVIM_TEST_INTEG test is noisy and makes the "skipped" list overwhelming
and less meaningful.

Solution:
- Mark non-actionable tests with "N/A".
- Report NVIM_TEST_INTEG tests as a separate 1-line summary.
2026-06-12 09:50:27 -04:00
zeertzjq
76cacf6f8b vim-patch:9.2.0623: possible integer overflow in spellfile tree bounds check (#40204)
Problem:  possible integer overflow in spellfile tree bounds check
Solution: Rewrite the overflow check (Devon Krik)

The check 'startidx + len >= maxidx' uses signed int addition and can
overflow when startidx approaches INT_MAX. After overflow the wrapped
result bypasses the guard, allowing the subsequent loop to write
idxs[startidx + i] out of bounds on the heap.

Replace the addition with a safe subtractive check that maintains the
original >= semantics: len >= maxidx - startidx cannot overflow because
both operands are valid indices within [0, maxidx].

This fixes CWE-190 (Integer Overflow) leading to CWE-122 (Heap-based
Buffer Overflow).

closes: vim/vim#20483

276920e138

Co-authored-by: Devon Kirk <hyder365@users.noreply.github.com>
2026-06-12 19:37:44 +08:00
Justin M. Keyes
6f68c872d6 test(windows): unskip some channel/job tests #38515 2026-06-12 07:35:43 -04:00
zeertzjq
00289fa20a vim-patch:9.2.0621: 'autoindent' not stripped with virtualedit=onemore (#40203)
Problem:  'autoindent' not stripped with virtualedit=onemore (after
          9.2.0510).
Solution: Restore the decrement of cursor column when it's on NUL.

fixes:  neovim/neovim#40183
closes: vim/vim#20476

4b13277edd
2026-06-12 18:53:35 +08:00
zeertzjq
8c4578cc4f vim-patch:78094ff: runtime(vim): Update base syntax, simplify function call matching (#40202)
- Explicitly match the dot accessor
- Exclude the qualifier when matching qualified function calls

The dot accessor lookbehind on builtin function calls was slow, matching
across expression based dictionary accessors was visually inconsistent,
and it's arguably more semantically correct.

closes: vim/vim#20481

78094ff1d7

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-12 18:38:27 +08:00
Jay Madden
3ed78daf83 perf(lsp): overscan semantic_token range requests #40036
Problem:
Flickering may occur when paging up/down in big files, as ranges for semantic
tokens are requested. This happens with LSP servers like gopls which return
"/full" semantic tokens if the file is too big, where we fall back to
viewport-range token retrievals.

Solution:
Broaden the requested ranges to one viewport of "overscan" on each side plus
some padding if possible:

    (viewport_topline - viewport_height)..(viewport_botline + viewport_height)
2026-06-11 17:16:54 -04:00
Matei Stroia
fe154f4d45 fix(folds): foldcolumn is interrupted for virtual line above nested fold (#39999)
Problem:
`foldcolumn` is empty for virtual lines above the start of a nested
fold.

Solution:
For virtual lines, compute the outer fold level and display it by
reusing the logic from `fill_foldcolumn`.
2026-06-11 13:42:18 +00:00
Justin M. Keyes
8b0060d92f Merge #40173 fix(docs): numbered listitems 2026-06-11 08:58:30 -04:00
Justin M. Keyes
5469fa8038 fix(docs): numbered listitems 2026-06-11 13:35:19 +02:00
Justin M. Keyes
a6584b205c docs: misc 2026-06-11 13:35:19 +02:00
zeertzjq
de10d10d3f vim-patch:9.1.1865: tests: do not notice lines containing only a tab (#40182)
Problem:  tests: test_codestyle does not notice lines containing only a
          tab
Solution: Fix the whitespace issue in eval.txt, update test_codestyle to
          notice such issues (Hirohito Higashi)

closes: vim/vim#18595

5b5290ec02

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-06-11 18:47:57 +08:00
Tomas Slusny
2fd2361a9d fix(startup): use nvim.difftool for nvim -d only for directories #40185
Problem:
`nvim -u NONE -d <(xxd one) <(xxd two)` has weird behavior.
Process substitution `<(...)` is a pipe and not a seekable file.

Test case:

    cat /dev/random | head -c 10240 > one 
    cp one two
    cat /dev/random | head -c 10240 >> two
    nvim -u NONE -d <(xxd one) <(xxd two)

Solution:
Workaround the issue by skipping `nvim.difftool` if the 2 args are not
directories; fall-through to the builtin diff handling.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2026-06-11 06:15:04 -04:00
zeertzjq
d72e91a0b6 Merge pull request #40162 from janlazo/vim-9.1.0944
vim-patch:9.1.{944,1956,1996}
2026-06-11 10:56:54 +08:00
Jan Edmund Lazo
273cad8f8d vim-patch:9.1.1996: tests: test_cmdline.vim leaves swapfiles behind
Problem:  tests: test_cmdline.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

bf1b41e387

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-06-10 22:39:35 -04:00