Commit Graph

22517 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
397ad21268 patch 9.1.1945: tests: Test_getbufwintabinfo() leaves swapfiles behind
Problem:  tests: Test_getbufwintabinfo() leaves swapfiles behind
Solution: Close all open buffers using %bw!

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1945
2025-12-02 19:59:54 +00:00
a04ab5f04c patch 9.1.1944: getwininfo() does not return if statusline is visible
Problem:  gewininfo() does not return if statusline is visible
Solution: Add status_height to the dict items returned by
          getwininfo() (Hirohito Higashi)

closes: #18841

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1944
2025-12-02 19:58:01 +00:00
c3cfdefdee runtime(doc): clarify the use of v:errormsg
fixes: #18825

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-01 20:02:10 +00:00
a474de64df patch 9.1.1943: Memory leak with :breakadd expr
Problem:  Memory leak with :breakadd expr
Solution: Free debug_oldval and debug_newval before assigning to them.
          Verify the existing (though confusing) :breakadd expr behavior
          (zeertzjq).

It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.

closes: #18844

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1943
2025-12-01 19:43:05 +00:00
cce452f52d runtime(lf): update syntax to support lf version r39
closes: #18846

Signed-off-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-01 18:49:24 +00:00
a4c43a6cf5 runtime(vim): Update base syntax, match full :language command
closes: #18808

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 15:44:36 +00:00
e5c5378cd2 patch 9.1.1942: Vim9: Assignment to read-only registers @: and @% is allowed
Problem:  Assignment to read-only registers @: and @% is allowed during
          compilation.
Solution: Abort compilation and emit an E354 error when assigning to
          these registers (Doug Kearns).

Fix the E354 error emitted when attempting to declare @: with :var so
that it references the correct register, @:,  rather than the garbage
string "^@".

closes: #18806

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1942
2025-11-30 15:26:22 +00:00
791478b30a patch 9.1.1941: tests: Test_execute_register() leaves swapfile behind
Problem:  tests: Test_execute_register() leaves swapfile behind
Solution: Use :bw instead of :close to close the buffer completely

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1941
2025-11-30 15:22:40 +00:00
aa133f8b3e patch 9.1.1940: clipboard registers "+" and "*" synced without "autoselect"
Problem:  clipboard registers "+" and "*" synced without "autoselect"
Solution: Remove code that explicitly syncs those clipboard registers
          (Corey Hickey)

Before this change, writes to '+' get copied to '*', but only under
certain conditions. By default, this does not happen, because clipboard
"autoselect" (via :set clipboard+=autoselect) is enabled. Disabling
"autoselect" (an option which should only apply to visual mode) results
in normal-mode writes such as "+yy also going to the '*' register.

This behavior is undocumented and untested; remove the behavior in order
to make Vim's handling of these two registers be consistent.

This frees up the did_star variable to be removed.

Add a test to check that the registers are independent.

fixes: #18830
closes: #18831

Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1940
2025-11-30 15:16:16 +00:00
6e9694df10 patch 9.1.1939: tests: test_matchfuzzy() leaves swapfiles behind
Problem:  tests: test_matchfuzzy() leaves swapfiles behind
Solution: Close loaded buffers using "%bw"

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1939
2025-11-30 15:09:53 +00:00
d4f9de889b patch 9.1.1938: tests: excessive wait in Test_matchfuzzy_initialized
Problem:  tests: excessive wait in Test_matchfuzzy_initialized
Solution: Use term_wait() instead of the TermWait() wrapper
          (Corey Hickey)

Test_matchfuzzy_initialized is a terminal test, which are specified to be
"flaky" and automatically retried. The TermWait wrapper multiplies the
specified wait time by higher values for later retries, maxing out at
10x the specified value. This makes tries #3 to #6 sleep for 20 seconds
each, which makes the test very slow to work with. The specified intent
of the test (as noted in a comment eight lines above here) is to
sleep for 2s.

closes: #18822

Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1938
2025-11-30 15:07:40 +00:00
a3925d783a patch 9.1.1937: tests: Test_matchfuzzy_initialized() fails
Problem:  tests: Test_matchfuzzy_initialized() fails
Solution: Send a dummy key (Corey Hickey)

Test_matchfuzzy_initialized seems to expect that the 'lvimgrep' will be
interrupted by sending a SIGINT. If the search finishes beforehand,
though, then the SIGINT triggers vim to tell the user how to quit.

Vim does not show this message immediately, though; instead, vim shows
the message next time it is active. When StopVimInTerminal() sends a key
sequence intended to cause vim to quit, this activates vim to show the
message instead of quitting.

I do not understand every detail of the problem fully--if I type the
characters from StopVimInTerminal() into a post-SIGTERM terminal
directly, that seems to work ok; there seems to be a timing issue due to
sending all the characters at once.

This fix does make the test work reliably for me, and the test still
works even if I limit my CPU frequency so that the search is interrupted
by the SIGINT.

fixes: #18821
related: #18822

Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1937
2025-11-30 15:02:39 +00:00
b087c5452b patch 9.1.1936: filetype: Erlang lexical files are not recognized
Problem:  filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
          filetype plugins (Jon Parise).

leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.

This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.

Reference:
-  https://www.erlang.org/doc/apps/parsetools/leex.html

related: #18819
closes: #18832

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1936
2025-11-30 14:45:48 +00:00
2b2580e61a patch 9.1.1935: filetype: not all Erlang files are recognized
Problem:  filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
          (John Parise).

*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)

Reference:
- https://www.erlang.org/doc/system/applications.html

Rebar is the Erlang build tool. rebar.config uses Erlang syntax.

Reference:
- https://rebar3.org/docs/configuration/configuration/

closes: #18835

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1935
2025-11-30 10:02:45 +00:00
8b9b422111 runtime(doc): Update and clarify vim9.txt Section 3
closes: #18779

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 09:40:04 +00:00
49f731d243 runtime(doc): Improve :help :catch command specification
The pattern argument is optional.  See :help :sort for another example.

closes: #18834

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 09:23:16 +00:00
ab090993ad runtime(netrw): fix undefined variable curwin in s:NetrwMenu()
fixes: #18829

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 22:37:06 +00:00
3ba6a97fea patch 9.1.1934: filetype: not all starlark files are recognized
Problem:  filetype: not all starlark files are recognized
Solution: Detect *.sky files as starlark filetype (Bruno Belanyi)

References:
- https://docs.bazel.build/versions/0.17.1/skylark/spec.html

closes: #18807

Signed-off-by: Bruno Belanyi <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1934
2025-11-28 20:48:55 +00:00
4bb44b287c runtime(doc): Change termdebug_config debug value to v:true in terminal.txt
closes: #18820

Signed-off-by: Rochish Manda <28740792+Rochish-Manda@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:42:13 +00:00
afd46fd9c9 runtime(doc): Correct typo in usr_30.txt regarding softtabstop
Fix typo in explanation of softtabstop and shiftwidth.

closes: #18823

Signed-off-by: Shin Rag <62047911+aquanjsw@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:37:16 +00:00
7f60105cba runtime(doc): fix typo in "appendbufline()", builtin.txt
closes: #18824

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:34:38 +00:00
bc1a82245c runtime(defaults): Update comment for reverting C comment strings
Add `g:` prefix, so the example works in vim9script as well (errors
without it).

closes: #18827

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
2025-11-28 20:25:41 +00:00
9ade3f5894 runtime(doc): Clarification in listener_add() doc
Make it clear that the overall end value can be greater than
line('$') + 1.

fixes: #18664
closes: #18828

Signed-off-by: Paul Ollis <paul@cleversheep.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:21:29 +00:00
cbcbff8712 patch 9.1.1933: completion: complete_match() is not useful
Problem:  completion: complete_match() Vim script function and
          'isexpand' option are not that useful and confusing
          (after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
          (Girish Palya).

complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.

* `f_complete_match()` in `insexpand.c` does not call any completion code.
   It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
   It does nothing on its own and amounts to misuse of a new option.

The following Vim script function can be used to implement the same
functionality:

```vim
  func CompleteMatch(triggers, sep=',')
    let line = getline('.')->strpart(0, col('.') - 1)
    let result = []
    for trig in split(a:triggers, a:sep)
      let idx = strridx(line, trig)
      if l:idx >= 0
        call add(result, [idx + 1, trig])
      endif
    endfor
    return result
  endfunc
```

related: #16716
fixes: #18563
closes: #18790

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1933
2025-11-27 21:28:05 +00:00
c531501748 patch 9.1.1932: OSC terminal response hard to detect
Problem:  OSC terminal response hard to detect
Solution: Add the <OSC> and <xOSC> pseudo keys
          (Foxe Chen).

related: #18660
closes: #18799

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1932
2025-11-27 20:53:36 +00:00
b217ffbef2 runtime(doc): remove outdated help about 'completeopt' "fuzzy"
closes: #18815

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 20:27:13 +00:00
1b51fd5eb5 translation: regenerate po/vim.pot after v9.1.1930
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 20:25:22 +00:00
057ea1232a patch 9.1.1931: completion: wrong item selected with fuzzy and noinsert
Problem:  completion: wrong item selected with fuzzy and noinsert
          (Evgeni Chasnovski)
Solution: Reset selected item after fuzzy sort
          (Girish Palya)

fixes: #18802
closes: #18816

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1931
2025-11-27 20:20:38 +00:00
33fbfe003c patch 9.1.1930: completion: 'completefuzzycollect' is too obscure
Problem:  completion: 'completefuzzycollect' option is too obscure
Solution: Deprecate the option, but don't error out for existing scripts,
          behave like 'completefuzzycollect' is set when fuzzy
          completion is enabled (Girish Palya).

fixes: #18498
closes: #18788

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1930
2025-11-26 21:00:16 +00:00
25a736e323 runtime(i3config/swayconfig): add all option for i3config only
Since i3 version 4.24, popup_during_fullscreen has new
option `all`. So add the `all` option for popup_during_fullscreen to
prevent `all` option highlighted as error.

However, sway won't implement `all` option for popup_during_fullscreen,
so let's remove the extra options from the syntax cluster in swayconfig
syntax script after sourcing the i3config.

Reference:
- https://i3wm.org/docs/userguide.html#_popups_during_fullscreen_mode
- https://github.com/swaywm/sway/issues/8746

closes: #18760

Signed-off-by: Robertus Chris <robertusdchris@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:37:09 +00:00
0e1ab0adb8 patch 9.1.1929: completion: spell completion wrong with fuzzy
Problem:  completion: spell completion wrong with fuzzy
Solution: Disable fuzzy sort for spell completion
          (Maxim Kim)

fixes #18800
closes: #18809

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1929
2025-11-26 20:23:44 +00:00
712b650332 runtime(doc): Fix typo in "Jumping to Changes", usr_08.txt
- Change "Prepended" (past tense) to "Prepend" (present tense,
  imperative).
- Add short examples clarifying the behavior of prepending a count to
  commands that jump to changes in diff mode.

closes: #18810

Signed-off-by: Brent Pappas <pappasbrent@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:12:28 +00:00
ef8588f8ea CI: retire socketserver runner
closes: #18811

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:06:03 +00:00
40699e3990 patch 9.1.1928: xxd: exit_with_usage() can be simplified
Problem:  xxd: exit_with_usage() can be simplified
Solution: Clean up exit_with_usage() formatting slightly
          (Stefan Haubenthal)

closes: #18813

Signed-off-by: Stefan Haubenthal <polluks@sdf.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1928
2025-11-26 20:02:16 +00:00
efa3b1f86d patch 9.1.1927: Wayland: clipboard code too complex
Problem:  Wayland: clipboard code too complex
Solution: Simplify clipboard related code around W23/W24
          (Foxe Chen).

Improve Wayland and clipboard related code:

- improve documentation
- remove unused code
- fix error handling
- remove warning per Clipboard_T

closes: #18794

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1927
2025-11-25 22:04:58 +00:00
c11fbe51e6 CI: Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

closes: #18803

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-25 21:50:30 +00:00
23d4e496f6 Update link to XDG base specification in option.c comment
closes: #18789

Co-authored-by: dkearns <dougkearns@gmail.com>
Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:35:12 +00:00
2190036c8c runtime(doc): Add environment variable expansion note to options
Add "Environment variables are expanded |:set_env|" documentation to
options that have the P_EXPAND flag but were missing this note.

Updated options:
- 'cdpath'
- 'dictionary'
- 'mkspellmem'
- 'packpath'
- 'runtimepath'
- 'spellfile'
- 'spellsuggest'
- 'thesaurus'
- 'ttytype'
- 'undodir'
- 'verbosefile'
- 'viewdir'
- 'viminfofile'

These options support environment variable expansion in their values
(e.g., $HOME, $USER) but the documentation didn't explicitly mention
this capability. This brings their documentation in line with other
options like backupdir, directory, and makeprg that already include
this note.

closes: #18791

Signed-off-by: Alex Plate <AlexPl292@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:30:19 +00:00
cf7c0038a4 patch 9.1.1926: xdiff: Coverity warning with MAX_CNT/UINT_MAX usage
Problem:  xdiff: Coverity warning with MAX_CNT/UINT_MAX usage
          (after v9.1.1921)
Solution: Replace XDL_MIN macro to a manual check.
          (Yee Cheng Chin)

In the recent xdiff upstream sync (#18765), MAX_CNT in xhistogram was
switched back to using UINT_MAX to match upstream. This exposed an issue
in xdiff that using using min() to compare against the max integer will
not work as the number will just overflow. Switch the check to be done
in a saturating add that respects integer overflow.

related: #18765
closes: #18792

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1926
2025-11-23 19:24:10 +00:00
898ac80be6 runtime(new-tutor): update vim-02-beginner following 48940d9
closes: #18793

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:19:35 +00:00
24af3eca68 patch 9.1.1925: make depend does not include osdef.h
Problem:  make depend does not add osdef.h for the dependencies
          (Drew Vogel)
Solution: Move ifdef PROTO (Hirohito Higashi).

fixes: #18777
closes: #18796

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1925
2025-11-23 18:43:25 +00:00
48940d94f6 runtime(tutor): Improve style for chapter 2
closes: #18786

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:46:27 +00:00
58fafb6549 runtime(tutor): Add Spanish translation for chapter 2
related: #18786

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:45:21 +00:00