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: 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>
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>
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>
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>
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>
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>
Problem: tests: shaderslang was removed from test_filetype erroneously
(Christian Clason, after v9.1.1030)
Solution: restore the test
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: link error when FEAT_SPELL not defined
(after v9.1.1016, John Marriott)
Solution: adjust ifdefs (Yegappan Lakshmanan)
closes: #16468
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Coverity complains about insecure data handling
(v9.1.1024)
Solution: use int consistently to access the blob index
(Yegappan Lakshmanan)
related: #16468
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: setting bash filetype is backwards incompatible
Solution: revert patch v9.1.0965, detect bash scripts again as sh
filetype
This reverts commit b9b762c21f2b61e0e7d8fee43d4d3dc8ecffd721.
related: #16309
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the installer can be improved
Solution: update the installer with the correct README and LICENSE
files, improve the documentation, add a Makefile for the
installer, update the Makefiles (RestorerZ)
fixes: #16378closes: #16378
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: too many strlen() calls in screen.c
Solution: refactor screen.c and remove calls to strlen(),
verify that leadmultispace != NULL (John Marriott)
closes: #16460
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: no sanitize check when running linematch
Solution: add sanitize check before applying the linematch algorithm,
similar to diff_find_change() (Jonathon)
closes: #16446
Signed-off-by: Jonathon <jonathonwhite@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: wrong return type of blob2str()
Solution: update return to list of string
(Yegappan Lakshmanan)
closes: #16461
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: blob2str/str2blob() do not support list of strings
(after v9.1.1016)
Solution: Add support for using a list of strings (Yegappan Lakshmanan)
closes: #16459
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Coverity complains about dereferencing NULL pointer
Solution: Verify curdiff is not null before dereferencing it
closes: #16437
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: string might be used without a trailing NUL (after v9.1.0997)
Solution: Make sure that the buffer is NUL terminated
closes: #16457
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: no way to get current selected item in a async context
Solution: add completed flag to show the entries of currently selected
index item (@glepnir)
closes: #16451
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: v9.1.0743 causes regression with diff mode
Solution: Fix the regression with overlapping regions
closes: #16454
Signed-off-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: Patch 9.1.1013 causes a few problems
Solution: Translate the function name only when it is a string
(Yegappan Lakshmanan)
fixes: #16453closes: #16450
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Not possible to convert string2blob and blob2string
Solution: add support for the blob2str() and str2blob() functions
closes: #16373
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Coverity complains about dereferencing NULL value
Solution: Check that cms2 is not null
closes: #16438
Signed-off-by: Christian Brabandt <cb@256bit.org>