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>
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>
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>
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>
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>
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>
- 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>
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: #18905closes: #18906
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
Problem: MS-Windows: dark mode in gui is not supported
Solution: Inplement the 'd' flag in 'guioptions'
(Mao-Yining).
related: #12282closes: #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>
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: #2589closes: #18889
Signed-off-by: Bjoern Foersterling <bjoern.foersterling@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
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>
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>
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>
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>
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: #18750closes: #18874
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
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/#numberscloses: #18852
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
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>
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>
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>
- 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>
- 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>
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>
- 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>
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>
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>
Problem: :stag does not use 'swichtbuf' option, though the
documentation states differently
(Christian Brabandt)
Solution: Respect 'switchbuf' option (Yegappan Lakshmanan).
related: #18845closes: #18856
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
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>
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>