Commit Graph

35998 Commits

Author SHA1 Message Date
zeertzjq
20e46cb38d vim-patch:af58a9f: runtime(doc): adjust :h 'autowrite' and :h 'autowriteall'
- Don't go over 78 columns.
- Change the first "and" to "or", as "or" is used below.
- Change "takes one" to "switches", as "one" may be mistaken as
  referring to the command instead of the user.
- Use backticks in :h 'autowriteall' like in :h 'autowrite'.

closes: vim/vim#19859

af58a9f5e9
2026-04-04 06:04:28 +08:00
zeertzjq
76a917a81e vim-patch:9.2.0267: 'autowrite' not triggered for :term
Problem:  'autowrite' not triggered for :term
Solution: Trigger autowrite for :term command
          (rendcrx)

closes: vim/vim#19855

466b5f531a

Co-authored-by: rendcrx <974449413@qq.com>
2026-04-04 06:04:25 +08:00
github-actions[bot]
b346b87fb2 docs: update version.c #38625
vim-patch:f4f175332 translation(ru): updated the Russian man page the xxd
vim-patch:e4502b603 translation(ru): updated lang/README.ru.txt
vim-patch:2c976d0de SECURITY.md: clarify the use of AI
vim-patch:9.2.0279: terminal: out-of-bounds write with overlong CSI argument list
vim-patch:9d83ca5ca runtime(preproc_indent): Ignore Swapfiles when loading buffers

Co-authored-by: marvim <marvim@users.noreply.github.com>
2026-04-03 10:41:17 -04:00
zeertzjq
33b9a9dcf1 vim-patch:880cf88: runtime(doc): Various fixes for ft_rust.txt (tw78, grammar, spaces) (#38730)
closes: vim/vim#19887

880cf88ea6

Co-authored-by: Peter Kenny <github.com@k1w1.cyou>
2026-04-03 21:38:44 +08:00
zeertzjq
333e3178ec vim-patch:9.2.0287: filetype: not all ObjectScript routines are recognized (#38731)
Problem:  filetype: not all ObjectScript routines are recognized
Solution: Also detect "%RO" and "iris" patterns inside *.rtn files
          (Hannah Kimura)

closes: vim/vim#19873

863e85e00a

Co-authored-by: Hannah <hannah.kimura@intersystems.com>
2026-04-03 18:26:04 +08:00
zeertzjq
2a4d666637 vim-patch:ff6f277: runtime(swayconfig): add additional criteria and hdr (#38728)
Sway 1.11 added `security_context_v1` metadata as criteria:
 - `sandbox_engine`
 - `sandbox_app_id`
 - `sandbox_instance_id`

Sway 1.12 will add the `tag` criteria for `xdg_toplevel_tag_v1`, as
well as the `hdr` output option (with options `on`, `off`, and
`toggle`).

closes: vim/vim#19884

ff6f277a4d

Co-authored-by: Felix Pehla <29adc1fd92@gmail.com>
2026-04-03 17:55:35 +08:00
zeertzjq
d7ef77d175 vim-patch:9.2.0285: :syn sync grouphere may go beyond end of line (#38727)
Problem:  :syn sync grouphere may go beyond end of line.
Solution: Start searching for the end of region at the end of match
          instead of a possibly invalid position (zeertzjq).

closes: vim/vim#19896

b7cffc8434
2026-04-03 09:22:26 +00:00
zeertzjq
3cb79189f3 vim-patch:12f6f20: runtime(sh): Keep function name patterns engine neutral (#38719)
Request less backtracking to function-name candidates for
nonlinear patterns with any regexp engine BUT force using
the old engine with these patterns to avoid incurring an
additional penalty, according to ":syntime report", when the
new regexp engine is preferred.

fixes:  vim/vim#19847
closes: vim/vim#19849

12f6f20552

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2026-04-03 07:00:47 +08:00
zeertzjq
596a7a32f3 test(terminal/cursor_spec): fix flaky test (#38712)
FAILED   test/functional/terminal/cursor_spec.lua @ 419: :terminal cursor uses the correct attributes
test/functional/terminal/cursor_spec.lua:448: Expected objects to be the same.
Passed in:
(string) 'block'
Expected:
(string) 'vertical'
stack traceback:
	test/functional/terminal/cursor_spec.lua:448: in function <test/functional/terminal/cursor_spec.lua:419>
2026-04-02 14:22:18 +00:00
dependabot[bot]
028805ccbb ci: bump korthout/backport-action
Bumps the github-actions group with 1 update in the / directory: [korthout/backport-action](https://github.com/korthout/backport-action).


Updates `korthout/backport-action` from 4.2.0 to 4.3.0
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](4aaf0e03a9...3c06f323a5)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 15:19:07 +02:00
zeertzjq
fb9c843ab0 feat(:restart): reattach all UIs (#38683)
This is quite easy since [command] is now only executed once on UIEnter.
2026-04-02 20:57:02 +08:00
Yi Ming
0eb2eb4106 refactor(lsp): remove implicit rpc error tostring #38707
Problem:
LSP error responses implicitly rely on a custom `__tostring` function
(`vim.lsp.rpc.format_rpc_error`) for formatting. This causes errors that are not
created via `vim.lsp.rpc.error` to behave inconsistently with those that are.

Furthermore, we usually use `log.error` to print these errors, which uses
`vim.inspect` under the hood, so the custom `__tostring`  provides little
benefit.

This increases the difficulty of refactoring the code, as it tightly couples RPC
error handling with the LSP.

Solution:
Convert every potential `__tostring` call to an explicit one. Since we don't
describe this behavior in the documentation, this should not be a breaking
change.
2026-04-02 08:53:29 -04:00
Christian Clason
2cf5dcb170 build(deps): bump tree-sitter to 64698af1a 2026-04-02 14:33:07 +02:00
Lewis Russell
3309b48c83 refactor(treesitter): add nts_parser_parse_buf
This PR creates a C function `nts_parser_parse_buf()`
which is like `ts_parser_parse_string()` but instead can be passed
an nvim buffer number to parse.
2026-04-02 14:29:36 +02:00
altermo
facc21cc63 fix(treesitter): select reset to "v" visualmode() 2026-04-02 14:29:09 +02:00
zeertzjq
f2cdf73afc fix(api): avoid error when parsing invalid expr after :echo (#38695)
Problem:  Parsing :echo followed by invalid expression leads to error.
Solution: Suppress error when skipping over expression.
2026-04-01 23:05:47 +00:00
zeertzjq
0851ac2706 vim-patch:9.2.0280: [security]: path traversal issue in zip.vim (#38693)
Problem:  [security]: path traversal issue in zip.vim
          (Michał Majchrowicz)
Solution: Detect more such attacks and warn the user.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-jc86-w7vm-8p24

7088926316

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-01 22:23:23 +00:00
Justin M. Keyes
68c26b344b docs: misc #38584 2026-04-01 17:04:41 -04:00
Justin M. Keyes
202f67dce3 Merge #38560 refactor vim.lsp.rpc 2026-04-01 16:46:59 -04:00
Luis Calle
79a2235fd1 perf(vim.pos): use nvim_buf_line_count instead of fetching all lines #38686 2026-04-01 15:28:31 -04:00
phanium
a2d9863c27 fix(ui2): vim.on_key should return nil instead of false (#38668) 2026-04-01 15:07:26 +02:00
zeertzjq
a0fcf32ad5 vim-patch:82ebaa7: runtime(racket): Make visual K mapping more robust for shell injection (#38677)
fyi @benknoble

82ebaa79b0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-01 19:21:24 +08:00
Yi Ming
dbd93de62a refactor(lsp): better encapsulation and readability, inline unnecessary 2026-04-01 18:16:40 +08:00
zeertzjq
65e2218585 vim-patch:9.2.0277: tests: test_modeline.vim fails (#38672)
Problem:  tests: test_modeline.vim fails (after v9.2.0276)
Solution: Rewrite the tests to use the existing s:modeline_fails()
          function, update documentation (zeertzjq).

8c8772c6b3
2026-04-01 08:43:03 +00:00
Jan Edmund Lazo
8367340b05 build(vim-patch): N/A runtime files (#38666)
* fix(vim-patch): runtime/doc/print.txt is N/A

- https://github.com/neovim/neovim/issues/21471

* fix(vim-patch): test_urls.vim is N/A

- https://github.com/neovim/neovim/pull/35593
2026-04-01 04:25:43 +00:00
zeertzjq
fa51f5502f vim-patch:12c6417: runtime(sshconfig): Add missing kex algorithm (#38656)
These are available already with openssh 10.2p1.

closes: vim/vim#19864

12c6417587

Co-authored-by: Thomas Braun <thomas.braun@byte-physics.de>
2026-04-01 10:00:31 +08:00
zeertzjq
c7604323e3 vim-patch:9.2.0276: [security]: modeline security bypass (#38657)
Problem:  [security]: modeline security bypass
Solution: disallow mapset() from secure mode, set the P_MLE flag for the
          'complete', 'guitabtooltip' and 'printheader' options.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-8h6p-m6gr-mpw9

75661a66a1

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-01 08:00:33 +08:00
zeertzjq
a89d7dcb91 docs: misc (#38578) 2026-04-01 07:59:51 +08:00
zeertzjq
d29db48e0a vim-patch:374f06f: runtime(racket): Use shellescape() to harden the K mapping
fyi: @benknoble

374f06ffd8

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Michał Majchrowicz <mmajchrowicz@afine.com>
2026-04-01 07:58:14 +08:00
zeertzjq
ec1bea9c05 vim-patch:e551e71: runtime(tera): use fnameescape() when loading separate syntax files
e551e71d7e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-01 07:58:14 +08:00
zeertzjq
0860b24c2c vim-patch:52169db: translation(cleanup): squeeze successive empty lines and remove stray comments
closes: vim/vim#19860

52169dbc28

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2026-04-01 07:46:16 +08:00
zeertzjq
9b9c72f6d4 vim-patch:cca3df9: translation: improve the po/cleanup.vim script
explicitly delete into the black-hole register

closes: vim/vim#15499

cca3df9275

Co-authored-by: RestorerZ <restorer@mail2k.ru>
2026-04-01 07:46:16 +08:00
Justin M. Keyes
2b7d793cd6 Merge #38579 from liskin/terminfo-urxvt
fix(termkey): use terminfo for (shift+)left/right keys
2026-03-31 18:07:08 -04:00
Matthew Chen
410ba8374d fix(tutor): open a temporary copy instead of original file #38522
Problem:
`:Tutor` should open a copy of the tutor file instead of the original. This is
because edits modify the original file buffer, and crashes or other misuse could
potentially corrupt the original file even if it's WO.

Solution:
Copy the tutor file to a temp path before opening. Store the original path in
`b:tutor_file` so metadata json loading still works.

- `tutor#TutorCmd` will now copy the tutor file to a temp path via `tempname()`
  before opening with `drop`. Store the original path in `b:tutor_file` only
  after the buffer is created.
- `tutor#LoadMetadata` now uses `b:tutor_file` to resolve the JSON path instead
  of `expand('%')`, which now points to the temp copy buffer
- `ftplugin/tutor.vim` does not make the `tutor#LoadMetadata` call anymore. It
  was guarded by `filereadable(expand('%').'.json')` which fails for the new
  temp copy path logic . Instead, `tutor#LoadMetadata` is already called
  directly inside `tutor#TutorCmd` since we are already assumed to enable
  interactive.

Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
2026-03-31 15:27:06 -04:00
luukvbaal
75e5e37942 fix(ui2): flicker when entering pager from expanded cmdline #38639
Problem:  'showcmd' causes flickering when pressing "g<" to enter the
          pager when the cmdline is expanded for messages.
          Initial keypress for an incomplete mapping is not giving 'showcmd'
          feedback while cmdline is expanded for messages (which is only
          dismissed upon the vim.on_key callback after 'timeoutlen').

Solution: Delay dismissing expanded cmdline when vim.on_key() callback
          receives "g".
          Place 'showcmd' "last" virtual text during expanded cmdline.
2026-03-31 15:01:58 -04:00
Christian Clason
953f9bc398 build(deps): bump tree-sitter to v0.26.8 2026-03-31 19:56:21 +02:00
Yi Ming
e31bfb81ce fix(lsp): use winresetview() to avoid switching to normal mode (#38641) 2026-03-31 09:31:30 -07:00
luukvbaal
cd2a27507a fix(window): clear cmdline 'ruler' when window is closed #38631
Problem:  When 'ruler' is in last line of the screen and the current
          floating window is closed, the ruler is not cleared.
Solution: When closing the current floating window, redraw the cmdline
          if that contained, and will no longer contain the 'ruler'.
2026-03-31 11:11:33 -04:00
luukvbaal
1685ced335 fix(cmdline): redraw cmdline after empty message (#38485)
Problem: Cmdline is not redrawn after an empty message clears it.
Remembered last drawn cursor position may be outdated but
equal to the current cmdline content with UI2.
Solution: Ensure cmdline is redrawn after an empty message clears it.
Compare wanted cursor position with actual cursor position.
2026-03-31 14:16:55 +02:00
altermo
1bcf2d7f90 fix(treesitter): select with node ending with unicode char (#38557)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2026-03-31 13:03:18 +08:00
zeertzjq
da58fe8fd2 fix(defaults): check for TUI on non-stdio channel on startup (#38581) 2026-03-31 11:17:33 +08:00
zeertzjq
96d6042689 test(tui_spec): work around flaky test with ASAN (#38619)
FAILED   test/functional/terminal/tui_spec.lua @ 2641: TUI exits immediately when stdin is closed #35744
test/functional/terminal/tui_spec.lua:2648: Failed to match any screen lines.
Expected (anywhere): "%[Process exited 1%]"
Actual:
  |^                                                  |
  |[Process exited 129]{100:                              }|
  |{100:~                                                 }|
  |{100:~                                                 }|
  |{3:[No Name]                                         }|
  |                                                  |
  |{5:-- TERMINAL --}                                    |
2026-03-31 02:26:23 +00:00
zeertzjq
19fff0e0be vim-patch:9.2.0232: fileinfo not shown after :bd of last listed buffer (#38453)
Problem:  fileinfo not shown after :bd of last listed buffer
          (memeplex)
Solution: Set need_fileinfo to true in empty_curbuf()
          (Hirohito Higashi)

When deleting the last listed buffer with :bd, the new empty buffer's
file info (e.g. "[No Name]" --No lines in buffer--) was not displayed.
do_ecmd() only calls fileinfo() for existing buffers (oldbuf), not for
newly created empty buffers.

Set need_fileinfo in empty_curbuf() so the file info is displayed after
redraw.

fixes:  vim/vim#548
closes: vim/vim#19802

3d472d8675

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 09:13:54 +08:00
zeertzjq
bc272cc36f test(tui_spec): unskip a few more tests on Windows (#38618) 2026-03-31 00:54:53 +00:00
Eisuke Kawashima
dbc4800dda vim-patch:2844765: translation: do not add message location as comments into vim.pot (#38587)
Let's add the --no-location to the xgettext command line call, so that
the generated vim.pot file does not contain the message location. Those
will get out of date soon and we don't want to update vim.pot just
because the location in a comment changes.

2844765e90

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-31 07:59:57 +08:00
zeertzjq
a3a48392c5 fix(:restart): only pass --headless when there is no UI (#38580)
Change --embed so that the first UI can be on non-stdio channel even if
neither --headless nor --listen is passed.
2026-03-31 07:00:34 +08:00
Christian Clason
545007ac72 build(deps): bump luajit to 18b087cd2 2026-03-30 23:43:26 +02:00
Christian Clason
e508aa0fa8 fix(ui2): allow empty argument for enable() #38605
Problem: `vim._core.ui2.enable` requires passing an empty table for
default options, unlike other (native) Lua API.

Solution: Initialize `opts` with empty table if `nil` is passed.
2026-03-30 16:47:02 +00:00
Ayush Goyal
f50e7d8205 fix(ui2): correct buffer reference in msg:start_timer() (#38600)
Problem:  Mixing "buf" and "M.bufs.msg" in M.msg:start_timer().
          Cannot run `require("vim._core.ui2").enable(nil)`.
Solution: Replace "M.bufs.msg" with "buf". Allow `opts == nil`.

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2026-03-30 16:36:45 +00:00
skewb1k
2dce2af768 docs: fix syntax errors in examples #38606 2026-03-30 11:49:30 -04:00