Problem: As stated in :help i_CTRL-X_CTRL-F, 'path' is not yet used for
filename completion.
Solution: Add EW_PATH flag in expand_wildcards of
get_next_filename_completion() (Fabian Wermelinger).
* Add new "pathopt" in 'completeopt' to enable 'path' consultation during
filename completion (not enabled by default).
* Add a new Test_ins_complete_files_in_path case for test_ins_complete.
* Update corresponding runtime/doc files.
closes: #21445
Signed-off-by: Fabian Wermelinger <fabian@git.0xfab.ch>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim syntax highlighting can sometimes be a bit slow, and it
might be unclear as to why.
Solution: Document a couple of tips to speed up syntax highlighting.
related: #21513
closes: #21572
Signed-off-by: jvoisin <julien.voisin@dustri.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: After a forced blockwise exclusive motion that makes a
one-column block, such as "d<C-V>`x" with the mark at the
cursor, "d" and "c" do nothing.
Solution: Do not use the inclusive flag to find an empty region for a
block, because "oap->end" is already the last column of the
block (Nagato Yuzuru).
fixes: #21547
related: #21540
related: neovim/neovim#24613
closes: #21548
Assisted-by: Claude
Signed-off-by: Nagato Yuzuru <nagato@yuzuru.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Error E1016 is used for 2 different things
(Ivan Pešić)
Solution: Use E1000 for the environment variable error.
fixes: #21522closes: #21538
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: On MS-Windows, "O" in a local listing does not copy the file,
Test_netrw_obtain_local() fails with E484. "cmd /c copy" does
not handle the composed source and target paths.
Solution: Use filecopy() for each file, as s:NetrwMarkFileCopy() does.
closes: #21534
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yoko Davis <56965728+revesis@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Pressing "O" in a local listing reports "cannot determine
method" instead of copying the file to the current directory
as documented in |netrw-O|.
Solution: Use the islocal argument of netrw#Obtain() instead of
b:netrw_islocal, and copy the files from b:netrw_curdir.
b:netrw_islocal is only set when a file is marked while other files are
already marked, so without marks netrw#Obtain() took the remote branch.
The names in the listing are relative to b:netrw_curdir, which is not
vim's current directory when netrw obtains a file, so the local copy
command could not find them.
related: #21534
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yoko Davis <56965728+revesis@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: netrw#Obtain() passes the hostname to netrw#msg#Notify() as a
third argument, so instead of "Rejecting invalid hostname"
the user gets E118: Too many arguments for function.
Solution: Format the message with printf() first, as the other
"Rejecting invalid hostname" messages in netrw already do.
related: #21534
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yoko Davis <56965728+revesis@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Similar to "sh.vim", there are a handful of other filetypes
whose names (assigned to "b:current_syntax") are different
from the base names of their syntax plugins, e.g. "python2"
and "elsa". Two scripts, "testdir/tools/maketestdeps" and
"testdir/runtest.vim", currently assume that the base name
of a syntax plugin can be derived from the name of a syntax
test. Prescribe using the base name of the syntax plugin,
instead of its filetype, for a test filename prefix so that
existing files are listed in Make targets ("maketestdeps")
and name correspondence is kept between the syntax plugin
and optional test settings for it ("runtest.vim"). Add a CI
check for name verification.
closes: #21414
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: crash when a type is nested very deeply, e.g.
"list<list<...>>" nested 100000 times, either directly or by
using type aliases, because of running out of stack space.
Solution: Give an error when a type is nested more than 1000 times,
including nesting through type aliases (Yegappan Lakshmanan).
fixes: #21566closes: #21498
Assisted-by: Claude
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: when a nested generic function is called with type
arguments, the type arguments are not used, e.g. the argument
types are not checked. Using it in a lambda gives a wrong
error and a type variable with the name of the function is not
rejected.
Solution: Create the function with the type arguments in the context of
the function where it is defined, also when used in a closure
or in a recursive call. Skip over type arguments of a
function name in an expression that is not evaluated. Check
the type variable names of a nested generic function
(Yegappan Lakshmanan).
When used in a closure or in a recursive call, the partial for the
function with the type arguments uses the context of the function where
the generic function is defined, which is found by going up the outer
partials.
fixes: #21565closes: #21496
Assisted-by: Claude
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: when a class implements a generic method of an
interface, the number of type variables is not checked, unlike
when a method is overridden in a child class.
Solution: Give an error when the number of type variables differs
(Yegappan Lakshmanan).
fixes: #21564closes: #21495
Assisted-by: Claude
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Test-case filenames should always begin with the associated
filetype name, properly delimited from the remaining part of
the filename. As of v9.2.0636~1, a convenience function
"DeferRenamingTestFileTo" is provided in "VIM_TEST_SETUP"
aware contexts to temporarily give the file under test
another, arbitrary name before executing ":syntax on".
closes: #21352
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: gitrevlist's keywordprg "git show" doesn't realise that input
should never be interpreted as an option. (Note that it is in
practice impossible to pass a value that is interpreted as an
option, but this expresses intent and is defensive.)
Solution: pass --end-of-options to force input to be interpreted as
arguments.
related: #20702
closes: #21472
Signed-off-by: Fionn Fitzmaurice <git@fionn.computer>
Signed-off-by: Christian Brabandt <cb@256bit.org>
While at it, also fix E716 when calling gnat.Get_Command('Find')
by renaming the key from 'Find_Program' to the expected 'Find_Command'.
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The dry run feature received negative feedback
Solution: Revert patches 9.2.1140 and 9.2.1084.
This reverts commit v9.2.1140 (6175ce8762) and
v9.2.1084 (e376846379).
Signed-off-by: Christian Brabandt <cb@256bit.org>
- all: Better handling of termguicolors in GUI
- desert: update Visual, make LineNr darkgray, distinct PmenuThumb and VertSplit/StatusLine
fixes: #21428closes: #21500
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: [security]: code injection via rmd syntax pattern for fenced
languages (ylerni7-ant)
Solution: Keep only the leading word characters of the language name
in the syntax script.
Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-x2w5-pj55-7hpc
Assisted-by: Claude Opus
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The documentation for getinfo() is hard to understand.
Solution: fix it.
closes: #21475
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Following the instructions manpager.vim's help does not work
for mandoc's man frontend
Solution: Explain how to set up MANPAGER for mandoc (Luca Del Re)
closes: #21424
Signed-off-by: Luca Del Re <v.commit@ldr.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the image feature can be improved
Solution: Refactor the image feature, make use of the pixman library if
possible, add image_info(), image_add() and image_discard()
functions and the 'imageprotocol' option (Foxe Chen)
closes: #21234
Assisted-by: Claude
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: There is no way to get the definition of a builtin or a user
defined function, of an Ex command, of an option or of a v:
variable from Vim script. A language server has to parse the
help text or the output of ":function" and ":command" for it.
Solution: Add getinfo({kind}, {name} [, {opts}]), which returns a Dict
with the definition of {name}: a function, an Ex command, an
option or a v: variable. Keep the names of the arguments of
the builtin functions in their table and report them in
"args" (Hirohito Higashi).
closes: #21293
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: In a block that is not executed, the text lines of :append,
:insert and :change are parsed as commands, so e.g. a text
line "endif" ends the block
Solution: Read and discard the text up to "." while skipping. Add the
commands to the ":help :bar" list.
closes: #21331
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: no unreachable error when every branch returns
Solution: Track termination for all branches and give E1095.
(Yegappan Lakshmanan).
closes: #21407
Assisted-by: GitHub Copilot
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: luaV_blob_index() and luaV_blob_newindex() only check the upper
bound of the index (Yuyao Jiang).
Solution: Handle a negative index as relative to the end, like Vim does.
related: #21373
Assisted-by: Claude Opus
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The paren-based typescriptArrowFuncDef patterns contain a nested
quantifier, \%(\_[^()]\+\|...\)*, which backtracks exponentially
with the old regexp engine when the match fails.
Solution: Drop the inner \+; the matched language is unchanged.
closes: #21400
related: HerringtonDarkholme/yats.vim#306
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Miura Yasuyuki <kokosabu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: A :def function in a legacy script can create a script-local
variable by assigning to it, while declaring one with "var"
gives E1101.
Solution: Give E1089 for assigning to an unknown script-local variable
in any :def function, not only in one defined in a Vim9
script. Remove uf_script_ctx_version, which was only used
for this check. Do not give it with ":source ++dryrun".
runtime/menu.vim created s:bmenu_short, s:bmenu_count, s:suglist,
s:fromword, s:changeitem, s:additem and s:ignoreitem this way, define
them at the script level.
":source ++dryrun" does not execute ":let" in a legacy script, thus
every script variable would be unknown when compiling. Document that
reading or calling such a variable without "s:" still gives an error,
and separate the paragraphs of ":source-dryrun" with blank lines.
Test_unlet() created s:somevar this way, define it at the script level
instead. Test_using_s_var_in_function() checks that assigning to
s:scriptlevel in a :def function of a legacy script gives E1089 when
the variable does not exist. Test_source_dryrun() checks that
assigning to a script variable with "s:" in a :def function of a
legacy script gives no error with ":source ++dryrun".
closes: #21379
Assisted-by: Claude
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>