Problem: Vim9: error when last enum value ends with a comma
Solution: Allow trailing commas in enum values (Yegappan Lakshmanan).
closes: #17744
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Take over as file maintainer.
- Improve highlighting of legacy script examples by using :syn-iskeyword
with the default 'iskeyword' value. Vim9 script examples are not
supported yet.
- Match admonition labels in more contexts.
- Match URLs in more contexts.
fixes#17721closes: #17731
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion: menu state wrong on interruption
(Maxim Kim)
Solution: Call show_pum() if completion was interrupted
(Girish Palya).
Popup menu was not built after fuzzy sorting, so internal state wasn't
reflected on screen.
No test. Couldn't get the terminal test to trigger both interruption and
refresh together.
fixes: #17725closes: #17736
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion: messages don't respect 'shm' setting
Solution: Turn off completion messages when 'shortmess' includes "c"
(Girish Palya).
`:set shortmess+=c` is intended to reduce noise during completion by
suppressing messages.
Previously, some completion messages still appeared regardless of this setting.
This change ensures that **all** completion-related messages are suppressed
when `'c'` is present in `'shortmess'`.
Not entirely sure if the original behavior was intentional. If there's a
reason certain messages were always shown, feel free to close this without
merging.
closes: #17737
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match the range prefix separately as a count.
- Match an explicit count of 1, rarely used but seen in the wild.
- Allow whitespace between the count and command.
closes: #17717
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Translators would like to work with the vim.pot file directly, without
having to clone and potentially build vim.
So let's include it.
closes: #17734
Signed-off-by: Christian Brabandt <cb@256bit.org>
This change:
* enforces that the alias starts with a letter
* allows the other words in an alias to be separated by either a space
or a hyphen, but not both or double separators
* allows only a letter after space, possibly followed by letters or
digits
* allows both letters and digits after a hyphen
Tested with:
a = '\N{Cyrillic Small Letter Zhe} is pronounced as zh in pleasure'
b = '\N{NO-BREAK SPACE} is needed here'
# ... other tests here
r = '\N{HENTAIGANA LETTER E-1} is a Japanese hiragana letter archaic ye'
s = '\N{CUNEIFORM SIGN NU11 TENU} is a correction alias'
t = '\N{RECYCLING SYMBOL FOR TYPE-1 PLASTICS} base shape is a triangle'
print(a)
print(b)
print(r)
print(s)
print(t)
The tests confirm the behavior and are selected from real Unicode
tables/aliases to check these combinations based on the specification.
fixes: #17323closes: #17735
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: string options in gen_opt_test.vim aren't fully sorted.
Solution: Sort the string options alphabetically. Also make description
of 'maxsearchcount' start with lower-case for consistency with
other options, update documentation for searchcount().
closes: #17720
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match more function calls.
- Contain function call syntax groups.
- Improve differentiation between Ex commands and builtin functions with
the same name. Remove special cases. Command modifiers are not
currently well differentiated from functions.
closes: #17712
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: helptoc: still some issues when parsing markdown code blocks
(VimWei)
Solution: assign nextline to curline before starting the next loop
iteration; when processing fenced code blocks, flip the
skip_fence variable, update the test to be more comprehensive
related: https://github.com/vim/vim/issues/17699#issuecomment-3055603968closes: #17716
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test_plugin_comment.vim uses :CheckScreenDump check but
doesn't actually use a screen dump.
Solution: Use :CheckRunVimInTerminal instead, remove a few empty lines.
test_plugin_comment.vim uses :CheckScreenDump to test for the screen
dump feature in each single test case.
However, since we are not actually using any screen dumps, it would be
more correct to use :CheckRunVimInTerminal, since this is the actual
command that we want to run.
And instead of verifying this for each single test, let's just do it
once when sourcing the file. While doing this, also remove some white
spaces.
closes: #17711
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The maximum search count uses a hard-coded value of 99
(Andres Monge, Joschua Kesper)
Solution: Make it configurable using the 'maxsearchcount' option.
related: #8855fixes: #17527closes: #17695
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: helptoc: does not handle code sections in markdown well
(VimWei)
Solution: Skip over fenced code sections (lacygoill), add a test.
fixes: #17699closes: #17710
Co-authored-by: lagygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Using `\n` is incorrect, as result of getline() does not contain line
breaks and only uses `\n` for NUL bytes.
- Return when b:asmsyntax is set, like many other filetypes.
closes: #17706
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: termdebug: not enough ways to configure breakpoints
Solution: add the termdebug_config['signs'] config setting, rework the
termdebug test cases (Dimitry Ishenko)
Allow to configure custom breakpoint signs so one can do something like
this:
```vim
let g:termdebug_config['signs'] = ['>1', '>2', '>3', '>4', '>5', '>6', '>7', '>8', '>9']
let g:termdebug_config['sign'] = '>>'
```
where the first 9 breakpoints will have their own signs and the rest
will be the same (>>).
While at it, rework the test for the termdebug plugin:
- Added test for g:termdebug_config['signs'].
- Added test for g:termdebug_config['sign'].
- Moved test for g:termdebug_config['sign_decimal'] into
Test_termdebug_basic()
closes: #17694
Signed-off-by: Dimitry Ishenko <dimitry.ishenko@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Win32: the toolbar in the GUI is old and dated
Solution: Include improved icons from Fatcow (CC by 3.0)
(RestorerZ)
closes: vim/vim-win32-installer#372
closes: #17698
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion: crash with getcompletion()
(zeertzjq)
Solution: Don't set may_expand_pattern in f_getcompletion(),
unset may_expand_pattern() once it is not longer needed
(Girish Palya).
fixes: #17680closes: #17686
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: Crash when using string compound assignment with wrong
data type (lacygoill)
Solution: verify expected member type (Hirohito Higashi)
fixes: #17675closes: #17693
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion: search completion match may differ in case
(techntools)
Solution: add "exacttext" to 'wildoptions' value (Girish Palya)
This flag does the following:
exacttext
When this flag is present, search pattern completion
(e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
shows exact buffer text as menu items, without
preserving regex artifacts like position
anchors (e.g., |/\<|). This provides more intuitive
menu items that match the actual buffer text. However,
searches may be less accurate since the pattern is not
preserved exactly.
By default, Vim preserves the typed pattern (with
anchors) and appends the matched word. This preserves
search correctness, especially when using regular
expressions or with 'smartcase' enabled. However, the
case of the appended matched word may not exactly
match the case of the word in the buffer.
fixes: #17654closes: #17667
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: v182 refactoring removed blank line cleanup (g/^$/d) from
s:LocalListing(), causing empty lines between directories
and files.
Solution: Add the missing cleanup after append() in s:PerformListing()
(uma-chan).
closes: #17672
Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
Signed-off-by: uma-chan <127664533+i9wa4@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: testdir is a bit messy
Solution: move test scripts into testdir/util/ directory
src/testdir/ has become a dumping ground mixing test cases with utility
functions. Let's fix this by moving all utility functions into the
testdir/util/ directory
Also a few related changes had to be done:
- Update Filelist
- update README.txt and mention the new directory layout
- fix shadowbuild by linking the util directory into the shadow dir
closes: #17677
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: too many imports in the test suite
Solution: Clean up the imported scripts
Most tests make use of check.vim, so let's just source it once in
runtest.vim instead of having each test manually source it.
runtest.vim already sources shared.vim, which again sources
view_util.vim, so we don't need to source those two common
dependencies in all the other tests
And then check.vim sources term_util.vim already, so we can in addition
drop sourcing it explicitly in each single test script.
Note: test_expand_func.vim had to be updated to account for the changed
number of sourced files.
And finally check.vim uses line-continuation so let's also explicitly
enable line continuation via the 'cpo' option value.
related: #17677
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test_clipmethod fails in non X11 environment
Solution: test that $DISPLAY is available
related: #17677
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: still some ANSI escape sequences in test messages output
Solution: update the cleanup regexp to also handle those ANSI escape
sequences: `<esc>|2h` and `<esc>|31H` like in this log output:
```
2025-07-05T20:02:47.6350409Z <esc>|2hExecuted 171 tests in 4.739708 seconds<esc>|31H
```
related: #17677
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When 'wildmode' is set to include "noselect", the popup menu (pum)
incorrectly retained its scroll position when reopened. This
meant that after scrolling down through the menu with `<C-n>`,
reopening the menu (e.g., by retyping the command and
triggering completion again) would show the menu starting from
the previously scrolled position, rather than from the top.
This could confuse users, as the first visible item would not
be the first actual match in the list.
Solution: Ensure that the popup menu resets its scroll position to the
top when reopened (Girish Palya).
closes: #17673
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When using `/` or `?` in command-line mode with 'ignorecase' and
'smartcase' enabled, the completion menu could show items that
don't actually match any text in the buffer due to case mismatches
Solution: Instead of validating menu items only against the user-typed
pattern, the new logic also checks whether the completed item
matches actual buffer content. If needed, it retries the match
using a lowercased version of the candidate, respecting
smartcase semantics.
closes: #17665
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Test_termdebug_decimal_breakpoints() fails with List index out
of range, because when adding the second breakpoint, the
cursor is still on the very first line (a header include line)
and therefore gdb refuses to set the breakpoint with:
`msg="No compiled code for line 1 in file XTD_decimal.c"`
Solution: Run the program, so that it will break at the very first
defined breakpoint and then once we are in the program,
set further breakpoints
closes: #17689
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: getcompletiontype() crashes when no completion is available
(after v9.1.1509).
Solution: Don't call set_expand_context() (zeertzjq)
fixes: #17681closes: #17684
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: autopkgtest files are not recognized
Solution: detect */debian/tests/control files as autopkgtest filetype
(James McCoy)
Autopkgtest is a Debian tool for testing installed versions of packages
when other, related packages are updated.
Reference:
- https://www.debian.org/doc/debian-policy/autopkgtest.txt
related: #17679
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no test that 'incsearch' is updated after accepting
search completion.
Solution: Add a test case (zeertzjq).
closes: #17682
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>