4011 Commits

Author SHA1 Message Date
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>
2025-12-13 18:23:54 +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
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>
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>
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
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
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>
2025-12-09 15:23:39 +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>
2025-12-09 13:27:00 +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>
2025-12-09 13:05: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>
2025-12-07 19:12:33 +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
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>
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>
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>
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>
2025-12-02 20:42:53 +00:00
Hirohito Higashi
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>
2025-12-02 19:58:01 +00:00
Christian Brabandt
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
Peter Kenny
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
Doug Kearns
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
Rochish Manda
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
Shin Rag
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
Mao-Yining
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
Paul Ollis
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
Girish Palya
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>
2025-11-27 21:28:05 +00:00
Foxe Chen
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>
2025-11-27 20:53:36 +00:00
zeertzjq
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
Girish Palya
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>
2025-11-26 21:00:16 +00:00
Brent Pappas
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
Foxe Chen
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>
2025-11-25 22:04:58 +00:00
Alex Plate
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
Doug Kearns
a08030c9f7 patch 9.1.1924: 'commentstring' requires +folding feature
Problem:  'commentstring' requires the +folding feature but is used in
	  contexts other than folding.
Solution: Remove the +folding feature guards from 'commentstring' and
          make it available in all builds (Doug Kearns).

closes: #18731

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 21:16:48 +00:00
Doug Kearns
d284277be9 runtime(doc): Remove :runtime completion (#11447) todo item
This was fixed in commit a6759381a5.

closes: #18769

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 19:44:16 +00:00
Konfekt
d0dd5614db runtime(compiler): add biome linter
closes: #18685

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 10:39:57 +00:00
Doug Kearns
eb732ed26d runtime(doc): Wrap overlength lines in uganda.txt
Wrap overlength lines and normalise URL indentation.

closes: #18737

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 21:01:42 +00:00
Doug Kearns
9ab6a22c90 runtime(doc): Improve :help :ls description formatting
Quote the special buffer names for consistency (see :help bufname()) and
so that they're not incorrectly highlighted as optional command
arguments.

closes: #18730

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:33:01 +00:00
notuxic
7dd51d3542 patch 9.1.1907: xterm: no support for mouse buttons 8 and 9
Problem:  xterm: no support for mouse buttons 8 and 9
Solution: Add support for terminals with xterm-like mouse functionality
          (notuxic)

closes: #18719

Signed-off-by: notuxic <notuxic@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-11 17:52:45 +00:00
Doug Kearns
97c37446e6 runtime(doc): Wrap some overlength lines in vim9{,class}.txt.
closes: #18724

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-11 16:47:24 +00:00
Peter Kenny
54cc820129 runtime(doc): Update Section 4 of vim9.txt
closes: #18610

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-10 20:29:08 +00:00
Doug Kearns
acf928a33b runtime(doc): Improve windows.txt formatting
- Wrap some overlength lines
- Highlight the example at :help WinScrolled-event

closes: #18713

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-10 19:45:32 +00:00
Doug Kearns
542746521f runtime(doc): Clean up file header whitespace
- :retab! line 1 and line 4 (main page heading).
- Use four columns whitespace before "by [Author]" in the user manual
  heading to match the reference manual formatting.
- double space headings.

closes: #18648

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-09 19:23:50 +00:00
Doug Kearns
185cec2b09 runtime(doc): Rewrite some overlength lines
closes: #18695

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-08 17:19:34 +00:00
Doug Kearns
a3063f2f90 runtime(doc): Wrap some overlength lines in the user manual
closes: #18696

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-08 17:18:16 +00:00
Doug Kearns
c28b73d349 runtime(doc): Improve :help synconcealed() description
closes: #18698

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-08 17:16:41 +00:00
Christian Brabandt
1ead1b51e1 patch 9.1.1896: tests: patch v9.1.1895 breaks CI
Problem:  tests: patch v9.1.1895 breaks CI, by failing screen dump tests
          test_listlbr_utf8, test_diffmode and test_cmdline
Solution: Revert it

Revert "patch 9.1.1895: OSC terminal response hard to detect"
This reverts commit 8707b7a15b.

related: #18660

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-02 15:25:18 +00:00
Christian Brabandt
213109a999 runtime(doc): clarify W11 warning and possible options
fixes: #18589

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-01 17:07:16 +00:00
Foxe Chen
8707b7a15b patch 9.1.1895: OSC terminal response hard to detect
Problem:  OSC terminal response hard to detect
Solution: Add the <OSC> and <xOSC> pseudo keys
          (Foxe Chen)

closes: #18660

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-01 16:28:52 +00:00