22560 Commits

Author SHA1 Message Date
Christian Brabandt
b5cf53b8b1 patch 9.1.1977: MS-Windows: missing dependency on optiondefs.h in Make_cyg_ming.mak
Problem:  MS-Windows: missing dependency on optiondefs.h in Mingw and
          Cygwin Makefile (Mao-Yining)
Solution: Update $INCL variable

fixes: #18915

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 18:43:27 +01:00
Foxe Chen
4438b8e071 patch 9.1.1976: Cannot define callbacks for redraw events
Problem:  When using listeners, there is no way to run callbacks at
          specific points in the redraw cycle.
Solution: Add redraw_listener_add() and redraw_listener_remove() and
          allow specifying callbacks for redraw start and end
          (Foxe Chen).

closes: #18902

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1976
2025-12-13 18:23:54 +01:00
Mao-Yining
3a113e04de nsis: add Chinese translation to nsis installer
closes: #18912

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 17:50:47 +01:00
Hirohito Higashi
e9a9833263 runtime(doc): Tweak documentation style in eval.txt and options.txt
closes: #18914

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 17:45:36 +01:00
Gourmet
ef7a577b27 runtime(doc): Remove outdated agide.org link
The agide.org domain no longer hosts Vim-related tools and now points to
unrelated content. Remove the outdated reference to avoid confusion.

closes: #18916

Signed-off-by: Gourmet <110063472+ItalianG0urmet@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 17:42:59 +01:00
Foxe Chen
3d06113c8c patch 9.1.1975: blob2str() may call STRNCPY() with a NULL pointer
Problem:  blob2str() may call strcpy with a NULL pointer
Solution: Check for NULL before calling STRNCPY()

closes: #18907

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1975
2025-12-12 08:52:07 +01:00
zeertzjq
353103e59a patch 9.1.1974: tests: missing cleanup in Test_bwipe_during_save()
Problem:  tests: missing cleanup in Test_bwipe_during_save().
Solution: Reset &charconvert.

closes: #18908

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1974
2025-12-12 08:47:18 +01:00
Foxe Chen
131d878aaa patch 9.1.1973: some minor problems with clipboard provider code
Problem:  some minor problems with clipboard provider code
          (after v9.1.1972)
Solution: Fix minor issues (Foxe Chen)

- allow empty register type for paste function to mean automatic
- fix internal inc_clip_provider() and dec_clip_provider() functions not
  setting the pause count correctly
- don't call paste function when yanking

closes: #18909

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1973
2025-12-12 08:44:14 +01:00
Foxe Chen
fcd3958dcb patch 9.1.1972: No way to access the clipboard without X11/Wayland
Problem:  No way to access the clipboard without X11/Wayland.
Solution: Add the clipboard provider feature (Foxe Chen).

closes: #18781

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1972
2025-12-11 21:13:35 +01:00
Christian Brabandt
98a0cbf05b patch 9.1.1971: crash with invalid positional argument 0 in printf()
Problem:  crash with invalid positional argument 0 in printf()
Solution: Reject positional arguments <= 0.

closes: #18898

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 20:51:03 +01:00
glepnir
fe1c57cd2c patch 9.1.1971: Crash when buffer gets deleted inside charconvert during save
Problem:  Crash when buffer gets deleted inside charconvert during save
Solution: Check for `b_saving` inside `can_unload_buffer()`, so we don’t try to
          unload a buffer while it’s still being saved (glepnir).

closes: #18901

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1971
2025-12-11 20:48:43 +01:00
phanium
fa3bdc2501 patch 9.1.1970: visual end column returns wrong value after block edit
Problem:  visual end column returns wrong value after block edit
Solution: update visual end column after block insert (phanium)

fixes:  #18900
closes: #18903

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: phanium <91544758+phanen@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1970
2025-12-11 20:39:27 +01:00
Doug Kearns
bfb9f5c40e runtime(doc): Rename NoDefaultCurrentDirectoryInExePath tag
- Add leading "$" to match other environment variable tags.
- Clarify :help $NoDefaultCurrentDirectoryInExePath.

closes: #18895

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 20:33:51 +01:00
zeertzjq
50325c3d59 patch 9.1.1969: Wrong cursor position after formatting with long 'formatprg'
Problem:  Wrong cursor position after formatting with long 'formatprg'.
Solution: Don't show hit-enter prompt when there are stuffed characters.

Previously a stuffed character at the hit-enter prompt will dismiss the
prompt immediately and be put in the typeahead buffer, which leads to
incorrect behavior as the typeahead buffer is processed after the stuff
buffers. Using vungetc() when KeyStuffed is TRUE can fix this problem,
but since the hit-enter prompt isn't visible anyway (and is likely not
desired here), just skip the prompt instead, which also avoids a wait
when using "wait" instead of "hit-enter" in 'messagesopt'.

fixes:  #18905
closes: #18906

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1969
2025-12-11 20:28:48 +01:00
Christian Brabandt
44d480e0c3 patch 9.1.1968: tests: test_python3.vim leaves swapfiles behind
Problem:  tests: test_python3.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1968
2025-12-11 20:26:06 +01:00
lsq
a52b11d057 patch 9.1.1967: if_python: 64bit numbers truncated
Problem:  if_python: 64bit numbers truncated
Solution: cast python result to long long (lsq)

fixes:  #18899
closes: #18904

Signed-off-by: lsq <lsqypj@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1967
2025-12-11 19:59:13 +01:00
Mao-Yining
e758eac336 patch 9.1.1966: MS-Windows: dark mode in gui is not supported
Problem:  MS-Windows: dark mode in gui is not supported
Solution: Inplement the 'd' flag in 'guioptions'
          (Mao-Yining).

related: #12282
closes: #18877

Co-Authored-By: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1966
2025-12-09 15:23:39 +01:00
Doug Kearns
927ad166a4 runtime(vim): Update base syntax, match full :help command
closes: #18833

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 13:40:59 +01:00
Bjoern Foersterling
ecce3497fa patch 9.1.1965: q can accidentally start recording at more prompt
Problem:  When exiting at the end of the more prompt (at the hit enter
          prompt) by hitting q the recording mode will be started.
          (Jakub Łuczyński)
Solution: Don't add the q key to the typeahead buffer
          in the function wait_return (Bjoern Foersterling)

fixes: #2589
closes: #18889

Signed-off-by: Bjoern Foersterling <bjoern.foersterling@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1965
2025-12-09 13:27:00 +01:00
zeertzjq
e72eacceab patch 9.1.1964: Wrong display when using setline() at hit-enter prompt
Problem:  Wrong display when using setline() at hit-enter prompt
          (after 8.2.3204).
Solution: Only skip scrolling for changed lines in top area if it's
          scrolled down due to w_topline change. Also add more testing
          for what 8.2.3204 fixed (zeertzjq).

closes: #18887

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1964
2025-12-09 13:10:12 +01:00
Yee Cheng Chin
4af6d9755c patch 9.1.1963: diff: missing diff size limit for xdiff
Problem:  diff: missing diff size limit for xdiff
Solution: Impose file size limit for internal diff (xdiff)
          (Yee Cheng Chin).

Git imposes a hard cap on file size for content that it passes to xdiff
(added to Git in dcd1742e56e, defined in xdiff-interface.h), due to
integer overflow concerns in xdiff. Vim doesn't specify such a limit
right now, which means it's possible for a user to diff a large file
(1GB+) and trigger these overflow issues.

Add the same size limit (1GB minus 1MB) to Vim and simply throws an
error when Vim encounters files larger than said limit. For now, reuse
the same error message regarding internal diff failures. There is no
need to add the same limit for external diff as it's up to each tool to
error check their input to decide what is appropriate or not.

closes: #18891

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1963
2025-12-09 13:05:17 +01:00
Sergio Alejandro Vargas
f958d35723 runtime(julia): Update Julia runtime files
Port changes from JuliaEditorSupport/julia-vim made during 2022-2025.
Most notably:

- 88f178c Do not reset shiftwidth/expandtab at undo
- f17257a Allow else block in try/catch
- 7946ce3 Support public statements (added in Julia v1.11.0-DEV.469)

Signed-off-by: Sergio Alejandro Vargas <savargasqu+git@unal.edu.co>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 12:55:17 +01:00
Aaron Jacobs
98ef8433b6 runtime(rust): use textwidth=100 for the Rust recommended style
The help text here said 99 was the recommended style for the standard
library, but I can't find a citation for this anywhere. In contrast the
Rust Style Guide hosted on rust-lang.org
[says](https://doc.rust-lang.org/stable/style-guide/#indentation-and-line-width)
the maximum line width is 100, and rustfmt
[agrees](37aa2135b5/src/tools/rustfmt/src/config/options.rs (L570)).

Having the two disagree causes an annoying off-by-one error in vim: if
you configure vim to highlight too-long lines then it will occasionally
complain about a line that rustfmt refuses to fix.

closes: #18892

Signed-off-by: Aaron Jacobs <jacobsa@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 12:43:39 +01:00
Christian Brabandt
b22c145c22 runtime(doc): document change in Windows behavior for patch 9.1.1947
closes: #18886

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 12:36:15 +01:00
Doug Kearns
cf5c255260 patch 9.1.1962: filetype: Erlang application resource files are not recognized
Problem:  filetype: Erlang application resource files are not recognized
Solution: Add content-based filetype detection for application resource
          files matching extension '*.app' (Doug Kearns)

related: #18835
closes:  #18842

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1962
2025-12-07 19:12:33 +01:00
zeertzjq
2b3566d89e patch 9.1.1961: :0tab behaves like :tab for :stag when 'swb' contains "newtab"
Problem:  :0tab behaves like :tab for :stag when 'switchbuf' contains
          "newtab" (after 9.1.1949).
Solution: Don't override cmod_tab if it's already non-zero (zeertzjq).

closes: #18859

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1961
2025-12-07 19:07:37 +01:00
glepnir
7a0d0a022a patch 9.1.1960: Wrong position of info popup
Problem:  When the popup menu is displayed above the cursor and the
          selected item has no room below for the info popup,
          popup_adjust_position() places the popup in the available
          space above. The calculation added some extra lines, causing
          the popup to be misaligned.
Solution: For info popups, undo that extra spacing so the popup stays
          aligned with the selected item (glepnir)

closes: #18860

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1960
2025-12-07 19:06:20 +01:00
glepnir
826d10296f patch 9.1.1959: Wrong wrapping of long output using :echowindow
Problem:  Outputting long strings using :echowindow wraps one character
          per line and display in reverse order (Hirohito Higashi)
Solution: Use full width for :echowindow, reset msg_col after wrapping,
          and increment lnum correctly when creating new lines (glepnir)

fixes: #18750
closes: #18874

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1959
2025-12-07 18:48:22 +01:00
zeertzjq
2da433cff7 patch 9.1.1958: Wrong display with sign_unplace() and setline() in CursorMoved
Problem:  Wrong display when scrolling with 'scrolloff' and calling
          sign_unplace() and setline() in CursorMoved (after 8.2.3204).
Solution: Still scroll for changed lines below the top area when the top
          is scrolled down (zeertzjq)

closes: #18878

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1958
2025-12-07 18:45:19 +01:00
Stanislaw Gruszka
b60b33a9dc patch 9.1.1957: filetype: bpftrace files are not recognized
Problem:  filetype: bpftrace files are not recognized
Solution: Detect *.bt files as btftrace filetype,
          include a btftrace filetype plugin (Stanislaw Gruszka)

closes: #18866

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1957
2025-12-06 10:40:44 +01:00
Maxim Kim
c7c16e4130 runtime(odin): support underscore-separated numeric literals
Add support for underscore-separated numeric literals in Odin syntax
highlighting. This allows proper highlighting of numbers like 1_000_000,
0xFF_AA_BB, and 0b1010_1111 as specified in the Odin language.

>  Numerical literals are written similar to most other programming
>  languages. A useful feature in Odin is that underscores are allowed
>  for better readability: 1_000_000_000 (one billion).
>  https://odin-lang.org/docs/overview/#numbers

closes: #18852

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:36:30 +01:00
Mao-Yining
911ecdcd0e runtime(doc): fix return value in 'exists' and 'exists_compiled()'
closes: #18867

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:33:45 +01:00
Christian Brabandt
f8c550fea0 patch 9.1.1956: tests: test_sort.vim leaves swapfiles behind
Problem:  tests: test_sort.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1956
2025-12-06 10:28:33 +01:00
Yegappan Lakshmanan
04794efe12 patch 9.1.1955: sort() does not handle large numbers correctly
Problem:  sort() does not handle large numbers correctly
          (Igbanam Ogbuluijah)
Solution: Don't truncate the return value of tv_get_number_chk()
          (Yegappan Lakshmanan)

closes: #18868

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1955
2025-12-06 10:22:07 +01:00
Yegappan Lakshmanan
f4a299700e 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: #18870

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1954
2025-12-06 10:13:00 +01:00
Mao-Yining
d30e76389c patch 9.1.1953: gui_mch_set_titlebar_colors() is excessively called
Problem:  gui_mch_set_titlebar_colors() doesn't need to be called when
          'go+=C' is not set.
Solution: Switch the default value to false.

closes: #18872

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1953
2025-12-06 10:04:06 +01:00
Josef Litoš
b46cbecb1d runtime(swayconfig): separate identifier groups + cleanup
- cleanup of PR for tearing and other output options
  - removed `allow_tearing` from global keywords (it's only an output option)
  - moved `...clockwise` directives from general to transform options
  - separated `icc` highlight to correctly detect and highlight paths
  - updated output bg to use the same approach as `icc` for file path
- separated all identifier-matchers into their own groups
- added support for bar identifiers

closes: #18851

Signed-off-by: Josef Litoš <54900518+litoj@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 21:10:02 +00:00
Josef Litoš
20d35f9eb9 runtime(i3config): highlight identifiers separately
- mapped all identifier-highlighting groups to a new group `i3ConfigIdent`
- i3config bar is now split into keyword and block matches
- support `xft:` namespace in fonts
- Update maintainer information in i3config.vim

related: #18851

Signed-off-by: Josef Litoš <54900518+litoj@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 21:09:19 +00:00
Christian Brabandt
23f23e611f patch 9.1.1952: tests: need better tests for tf files
Problem:  tests: need better tests for tf files
Solution: Add better filetype test for terraform/tf filetype

closes: #18339

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1952
2025-12-03 21:01:37 +00:00
Doug Kearns
89f422df41 runtime(quarto): add missing loaded guard
closes: #18630

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:30:59 +00:00
Rob B
8d8c9074c3 runtime(python): Highlight t-strings
- Highlight t-strings
- Update comments
- Add tests

closes: #18679

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:25:41 +00:00
Doug Kearns
85fc83f849 runtime(sml): Update syntax, improve special constant matching
- Match \dE\d real literal form
- Match all string escape sequences
- Add related tests

closes: #18723

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:21:49 +00:00
D. Ben Knoble
ffc7f8c9da runtime(hog): set undo_ftplugin correctly, delete trailing whitespace
closes: #18727

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:15:06 +00:00
zeertzjq
2c164f02c6 patch 9.1.1951: tests: Test_windows_external_cmd_in_cwd() only run in huge builds
Problem:  tests: Test_windows_external_cmd_in_cwd() is only run in huge
          builds (after 9.1.1947).
Solution: Move it to test_system.vim so that it is run in normal builds.

closes: #18853

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1951
2025-12-03 20:10:07 +00:00
Christian Brabandt
05a56aabee patch 9.1.1950: tests: Test_tagjump.vim leaves swapfiles behind
Problem:  tests: Test_tagjump.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1950
2025-12-03 19:27:08 +00:00
Yegappan Lakshmanan
efc7509be2 patch 9.1.1949: :stag does not use 'swichtbuf' option
Problem:  :stag does not use 'swichtbuf' option, though the
          documentation states differently
          (Christian Brabandt)
Solution: Respect 'switchbuf' option (Yegappan Lakshmanan).

related: #18845
closes: #18856

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1949
2025-12-03 19:22:13 +00:00
Peter Kenny
2d54d9934d runtime(doc): Update vim9.txt Section 1
closes: #18855

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 19:13:34 +00:00
Christian Brabandt
4d87c9742a patch 9.1.1948: Windows: Vim adds current directory to search path
Problem:  Windows: Vim always adds the current directory to search path.
          This should only happen when using cmd.exe as 'shell'. For
          example, powershell won't run binaries from the current
          directory.
Solution: Only add current directory to system path, when using cmd.exe
          as 'shell'.

related: #10341
related: 083ec6d9a3

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1948
2025-12-02 21:46:34 +00:00
Christian Brabandt
083ec6d9a3 patch 9.1.1947: [security]: Windows: Vim may execute commands from current directory
Problem:  [security]: Windows: Vim may execute commands from current
          directory (Simon Zuckerbraun)
Solution: Set the $NoDefaultCurrentDirectoryInExePath before running
          external commands.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-g77q-xrww-p834

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1947
2025-12-02 21:22:02 +00:00
Peter Kenny
c0f2d2f140 patch 9.1.1946: Cannot open the help in the current window
Problem:  Cannot open the help in the current window
Solution: Promote the example from tips.txt to a proper package and
          include the helpcurwin package, add tests for it
          (Peter Kenny)

closes: #18840

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1946
2025-12-02 20:42:53 +00:00