Problem: Popup menu internal error with some abbr in completion item.
Solution: Don't compute attributes when there is no corresponding text.
Reduce indent in pum_redraw() while at it (zeertzjq).
fixes: #16427closes: #16435
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: diff feature can be improved
Solution: include the linematch diff alignment algorithm
(Jonathon)
closes: #9661
Signed-off-by: Jonathon <jonathonwhite@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test for patch 9.1.1006 doesn't fail without the patch
(after v9.1.1006)
Solution: Add ctermbg=NONE to the highlight groups (zeertzjq).
closes: #16425
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: various ignore are not recognized
Solution: detect rg/docker/npm/vvsce ignore files as 'gitgnore' filetype
(Wu, Zhenyu)
Not only prettier, but many programs also support ignore files (like rg,
docker, npm, vscode). So use the gitignore filetype for them due to same syntax
closes: #16428
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Also, fold the difference part and the bottom part for the
identical screendump files.
closes: #16380
Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: PmenuMatch completion highlight can be combined
Solution: Combine highlight groups PmenuMatch with Pmenu and
PmenuMatchSel with PmenuSel (glepnir)
fixes: #15563closes: #16408
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion text is highlighted even with no pattern found
Solution: use ins_compl_leader_len() instead of checking
compl_leader.length (glepnir)
closes: #16422
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: a few termdebug tests are flaky; test_termdebug_basic()
and test_termdebug_config_types() may fail if there is too
much load
Solution: Set g:test_is_flaky
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: [security]: heap-buffer-overflow with visual mode when
using :all, causing Vim trying to access beyond end-of-line
(gandalf)
Solution: Reset visual mode on :all, validate position in gchar_pos()
and charwise_block_prep()
This fixes CVE-2025-22134
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-5rgf-26wj-48v8
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Improve how to find the justify package
closes: #16420
Co-authored-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: unknown function error with interface declaring a
function variable (lifepillar)
Solution: Use correct instruction for getting interface member variables
(Yegappan Lakshmanan)
fixes: #16345closes: #16421
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: ComplMatchIns highlight hard to read on light background
(after v9.1.0996)
Solution: define the highlighting group cleared, it should be configured in
colorschemes separately (glepnir)
closes: #16414
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Match the '' escape sequence in literal strings. These were previously
ending the current string and starting another concatenated literal
string.
closes: #16415
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Problem: tests: ruby tests fail with Ruby 3.4
Solution: adjust expected output for Ruby 3.4
(Yee Cheng Chin)
Vim's Ruby tests relied on explicit matching of output texts which are
fragile in design. Ruby 3.4 has changed the output slightly (using
'name' instead of `name', and also using more spaces in dictionary
printouts). Modify the Vim tests to be less fragile to such changes.
closes: #16411
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: leaking finished exception
(after v9.1.0984)
Solution: use finish_exception to clean up caught exceptions
(Yee Cheng Chin)
In Vimscript, v:exception/throwpoint/stacktrace are supposed to reflect
the currently caught exception, and be popped after the exception is
finished (via endtry, finally, or a thrown exception inside catch).
Vim9script does not handle this properly, and leaks them instead. This
is clearly visible when launching GVim with menu enabled. A caught
exception inside the s:BMShow() in menu.vim would show up when querying
`v:stacktrace` even though the exception was already caught and handled.
To fix this, just use the same functionality as Vimscript by calling
`finish_exception` to properly restore the states. Note that this
assumes `current_exception` is always the same as `caught_stack` which
believe should be the case.
Added tests for this. Also fix up test_stacktrace to properly test the
stack restore behavior where we have nested exceptions in catch blocks
and to also test the vim9script functionality properly.
- Also, remove its dependency on explicitly checking a line number in
runtest.vim which is a very fragile way to write tests as any minor
change in runtest.vim (shared among all tests) would require changing
test_stacktrace.vim. We don't actually need such granularity in the
test.
closes: #16413
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: TI assembly files are not recognized
Solution: inspect '*.sa' and assembly files and detect TI assembly
files, include filetype plugin and syntax script for TI
assembly files (Wu, Zhenyu)
closes: #15827
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: too many strlen() calls in drawscreen.c
Solution: refactor drawscreen.c and remove calls to strlen(),
make get_keymap_str() (in screen.c) return string length
instead of TRUE/FALSE (John Marriott).
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: ComplMatchIns may highlight wrong text
Solution: don't highlight in case of fuzzy match,
skip-highlight when not inserting anything
(glepnir)
closes: #16404
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Always match ex-bang explicitly rather than incidentally as the ! operator.
fixes: #16221closes: #16410
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Apparently even when loading the snd-dummy kernel module, the
CI tests for the sounds feature in test_sound.vim are already skipped.
So let's just remove all of this (even so we may loose a bit of coverage
information here).
closes: #16391
Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: shaderslang files are not detected
Solution: detect '*.slang' files as shaderslang filetype,
include a filetype and syntax script (mtvare6)
Reference:
https://shader-slang.com/closes: #16387
Signed-off-by: mtvare6 <mtvare6@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: not able to use comment after opening curly brace
(lifepillar)
Solution: allow to use comments after curly braces of an inner-block,
modify the logic to search for comment in a line, update Vim9
tests to use specific class type instead of any
(Yegappan Lakshmanan)
fixes: #16363closes: #16405
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Although patch 9.1.0990 fixed a real problem/inconsistency,
it also introduced new behavior that may break BWC and/or be
unexpected. Before 9.1.0990, window commands could make the
topframe smaller (without changing 'cmdheight'; quirk that is
now fixed), but did not allow extending the topframe beyond
the 'cmdheight' set by the user. After 9.1.0990, the user can
reduce the 'cmdheight' below the value they set explicitly,
through window commands, which may lead to confusion.
(aftere v9.1.0990)
Solution: Store the value explicitly set by the user and clamp the
'cmdheight' when resizing the topframe. This also applies to
dragging laststatus, which in contrast to window commands
_did_ allow reducing the 'cmdheight' to values below the one
set by the user. So with this patch there is still new
behavior, but I think in a way that is less surprising.
While at it, also fix a Coverity warning, introduced in
v9.1.0990 (Luuk van Baal)
closes: #16385
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: double-free after v9.1.0988
(h-east)
Solution: clear typval pointer, before setting the type
(Yegappan Lakshmanan)
Otherwise the contents are still referring to some other value.
fixes: #16386closes: #16388
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: v:stacktrace has wrong type in Vim9 script.
Solution: Change the type to t_list_dict_any. Fix grammar in docs.
(zeertzjq)
closes: #16390
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Inconsistent behavior when changing cmdheight by resizing the
topframe through wincmds and dragging laststatus. Changing
cmdheight by resizing the topframe does not trigger OptionSet.
Solution: Consolidate logic for changing the cmdheight, set the option
value to handle side-effects (Luuk van Baal)
closes: #16359
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: Whitespace after the final enum value causes a syntax
error
Solution: Fix parsing to allow whitespace after the final enum value.
(Doug Kearns)
closes: #16383
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: no error when using uninitialized var in new()
(lifepillar, Aliaksei Budavei)
Solution: Give an error if an uninitialized object variable is referenced
in new() (Yegappan Lakshmanan)
fixes: #14411fixes: #16344closes: #16374
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: 'jj' filetype is a bit imprecise
Solution: rename 'jj' filetype to 'jjdescription'
(Gregory Anders)
closes: #16364
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Abbreviated :enum and :interface commands are no longer supported.
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: some ex commands can be shortened
Solution: disallow shortening of :abstract, :interface and :type
(h-east)
closes: #16356
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Revert the documentation for :horizontal from commit
0c3e57b403 because :horizontal cannot be shortened to :ho
closes: #16362
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>