Problem: too many strlen() calls in userfunc.c
Solution: refactor userfunc.c and remove calls to strlen(),
drop set_ufunc_name() and roll it into alloc_ufunc(),
check for out-of-memory condition in trans_function_name_ext()
(John Marriott)
closes: #16537
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: terminal: E315 when dragging the terminal with the mouse
(user202729)
Solution: call update_topline() and validate_cursor() when clicking
on the status line with the mouse (Hirohito Higashi)
fixes: #16024fixes: #16211closes: #16552
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem:
Saw the following error when invoking gx mapping with cursor on a URL:
Error detected while compiling function <SNR>95_GetWordUnderCursor:
line 7:
E1123: Missing comma before argument: return expand(user_var)
E116: Invalid arguments for function dist#vim9#Open
Solution:
The line before "return expand(...)" has two open parentheses but only
one close parenthesis. Add another close parenthesis.
closes: #16553
Signed-off-by: Morton Fox <github@qslw.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test_glvs fails when unarchiver not available
(Brian L. Matthews)
Solution: Check if an unarchiver is available, skip the test otherwise
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim always enables 'termguicolors' in a terminal, even
when not wanted (after v9.1.1054)
Solution: Respect `:set notermguicolors` in vimrc file
fixes: #16538fixes: #16539closes: #16540
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion: input text deleted with preinsert when adding leader
Solution: remove compl_length and check the ptr for being equal
to pattern when preinsert is active (glepnir)
closes: #16545
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: translation(sr): Missing Serbian translation for the tutor
Solution: include new Serbian translation for the new tutor,
include translation for chapter 2 of the traditional tutor,
update the Makefiles for installing the runtime files
(Ivan Pešić)
closes: #16550
Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The version check introduced with commit edd4ac3e8 has a logic error.
Also it should only trigger when trying to use the netrw plugin and not
always.
fixes: #16541
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim doesn't highlight to be inserted text when completing
Solution: Add support for the "preinsert" 'completeopt' value
(glepnir)
Support automatically inserting the currently selected candidate word
that does not belong to the latter part of the leader.
fixes: #3433closes: #16403
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
relevant commits:
- deprecate!: netrw#Launch, netrw#Open and gx mappings
- refactor: move some utility functions in a private file
- feat: add function to deprecate features
- refactor!: remove NetrwClean command and function
- refactor: use appropriate directories to store temporary files
- refactor: better way to call vim.ui.open
- refactor(Open): prefer lua wrapper function instead of cmdline
- refactor!: drop vim 7 checks
- refactor: use vim.ui.open when using neovim
- refactor: remove s:CheckIfKde
- refactor: balloon functionality
- refactor!: remove netrw#Access function
closes: #16519
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: make install fails because of a missing dependency
Solution: add explicit dependencies for tutor/{en,it}
(Sergei Trofimovich)
Without the change `make install -j16` fails
sometimes due to race condition to create a directory.
It's best reproducible with `make --shuffle`:
$ make install --shuffle
...
bash install-sh -c -d /vim-9.1.0990/share/vim/vim91/tutor
chmod 755 /vim-9.1.0990/share/vim/vim91/tutor
cp ../runtime/tutor/README* ../runtime/tutor/tutor* /vim-9.1.0990/share/vim/vim91/tutor
cp ../runtime/tutor/en/* /vim-9.1.0990/share/vim/vim91/tutor/en/
cp: target '/vim-9.1.0990/share/vim/vim91/tutor/en/': No such file or directory
make[1]: [Makefile:2487: installtutor] Error 1 (ignored) shuffle=2340321974
cp ../runtime/tutor/it/* /vim-9.1.0990/share/vim/vim91/tutor/it/
cp: target '/vim-9.1.0990/share/vim/vim91/tutor/it/': No such file or directory
make[1]: [Makefile:2488: installtutor] Error 1 (ignored) shuffle=2340321974
The fix adds a dependency on targeted directories used to install tutor.
Before the change it too 2-3 attempts to reproduce the install failure.
After the change `vim` survives 150 install attempts without failures.
closes: #16531
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim doesn't work well with TERM=xterm-direct
(Andrea Pappacoda)
Solution: detect if a terminal supports true-colors and
enable termguicolors
The terminfo database for xterm-direct contains both the (non-standard)
termcap RGB capability and a number of colors == 0x1000000 so it seems
either of those two options can be used to detect a terminal capable of
displaying true colors.
So set the termguicolor option automatically, when either of the two
options is detected. (for some reasons, my debian xterm (v393) does not
respond to XTGETTCAP query attempts, so falling back to the number of
colors seems like a good compromize)
fixes: #16327closes: #16490
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: "nosort" enables fuzzy filtering even if "fuzzy" isn't in
'completeopt' (after v9.1.1049)
Solution: Only enable fuzzy filtering when "fuzzy" is in 'completeopt'.
(zeertzjq)
closes: #16510
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: off-by-one error in CheckCWD in test_debugger.vim
Solution: Fix off-by-one in CheckCWD leading to local tests failure
(Yee Cheng Chin)
Vim's test_debugger's Test_debug_backtrace_level test will fail if you
happen to run it in a Vim repository with full path of directory being
exactly 29 characters (e.g. `/Users/bob/developing/src/vim`). The test
does term dump comparison and the printout will overflow if the CWD is
too long. It does have a function to skip to test if it detects that but
it's off by one leading to this one situation where it will fail.
The reason why the logic didn't account for this is that Vim's message
printing will overflow the text if it prints a message at exactly the
width of the terminal. This could be considered a bug / quirk but that
will be another issue.
closes: #16517
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no support for env variables when running Vim in
terminal
Solution: support the "env" argument in RunVimInTerminal(),
close swapfiles properly in test_termcodes,
use CheckFeature in test_termencoding
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: too many strlen() calls in os_unix.c
Solution: refactor os_unix.c and remove calls to strlen()
(John Marriott)
closes: #16496
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: insert-completed items are always sorted, although the LSP
spec[1] standard defines sortText in the returned
completionitem list. This means that the server has sorted the
results. When fuzzy is enabled, this will break the server's
sorting results.
Solution: disable sorting of candidates when "nosort" is set in
'completeopt'
[1]
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemcloses: #16501
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Crash after scrolling and pasting in silent Ex mode.
(fizz-is-on-the-way)
Solution: Don't move cursor to line 0 when scrolling.
(zeertzjq)
closes: #16506
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: N-Tripels and TriG files are not recognized
Solution: detect '*.nt' files as ntriples filetype and '*.trig' files
as trig filetype (Gordian Dziwis)
closes: #16493
Signed-off-by: Gordian Dziwis <gordian@dziw.is>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: Patch 9.1.1014 causes regressions
Solution: revert it for now
This reverts commit 57f0119358ed7f060d5020309b9043463121435f since this
causes some regressions:
https://github.com/vim/vim/pull/16440#issuecomment-2600235629
So revert "patch 9.1.1014: Vim9: variable not found in transitive
import" for now.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Ignore the src/{LICENSE,README.txt} which are created from shadow
directories.
closes: #16499
Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: just files are not recognized
Solution: adjust filetype detection pattern, detect just shebang line,
include just ftplugin, indent and syntax plugin
(Peter Benjamin)
closes: #16466
Signed-off-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: out-of-bound access when echoing an enum
Solution: Add NUL to growarray, check that ufunc is non-null
before accessing it to make Coverity happy
(Yegappan Lakshmanan)
closes: #16488
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: imported type cannot be used as func return type
(Dayvid Albuquerque)
Solution: temporarily reset the is_export flag (Yegappan Lakshmanan)
fixes: #16489closes: #16492
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This was missed in 37c64c78fd87e086b5a945ad7032787c274e2dcb.
closes: #16491
Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: comments are outdated
Solution: Update comments, and include an enum example in the help
(Yegappan Lakshmanan)
closes: #16485
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test_channel.py fails with IPv6
(eds-collabora)
Solution: Use 127.0.0.1 instead of localhost
fixes: #16398
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match is? and isnot? operators.
- Limit other comparison operators to one match modifier rather than
two.
closes: #16482
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: confusing error when using abstract method via super
Solution: Display an error when an abstract method is invoked using
super (Ernie Rael)
fixes: #15514closes: #16478
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: make install fails when using shadowdir
(after v9.1.1029)
Solution: also link in README.txt and LICENSE file
Signed-off-by: Christian Brabandt <cb@256bit.org>