Luca Saccarola [Wed, 29 Jan 2025 17:39:30 +0000 (18:39 +0100)]
runtime(netrw): upstream snapshot of v176
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>
patch 9.1.1054: Vim doesn't work well with TERM=xterm-direct
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)
zeertzjq [Sat, 25 Jan 2025 14:29:03 +0000 (15:29 +0100)]
patch 9.1.1053: "nosort" enables fuzzy filtering even if "fuzzy" isn't in 'completeopt'
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>
patch 9.1.1052: tests: off-by-one error in CheckCWD in test_debugger.vim
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>
patch 9.1.1051: tests: no support for env variables when running Vim in terminal
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
glepnir [Thu, 23 Jan 2025 18:55:14 +0000 (19:55 +0100)]
patch 9.1.1049: insert-completed items are always sorted
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'
Gordian Dziwis [Tue, 21 Jan 2025 21:24:23 +0000 (22:24 +0100)]
patch 9.1.1045: filetype: N-Tripels and TriG files are not recognized
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>
Peter Benjamin [Mon, 20 Jan 2025 20:56:41 +0000 (21:56 +0100)]
patch 9.1.1042: filetype: just files are not recognized
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>
patch 9.1.1041: Vim9: out-of-bound access when echoing an enum
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>
patch 9.1.1040: Vim9: imported type cannot be used as func return type
Problem: Vim9: imported type cannot be used as func return type
(Dayvid Albuquerque)
Solution: temporarily reset the is_export flag (Yegappan Lakshmanan)
fixes: #16489
closes: #16492
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Ernie Rael [Sun, 19 Jan 2025 09:03:00 +0000 (10:03 +0100)]
patch 9.1.1037: Vim9: confusing error when using abstract method via super
Problem: Vim9: confusing error when using abstract method via super
Solution: Display an error when an abstract method is invoked using
super (Ernie Rael)
Luca Saccarola [Sat, 18 Jan 2025 16:36:02 +0000 (17:36 +0100)]
runtime(netrw): upstream snapshot of v175
Relevant commits:
- release: netrw v175
- fix: prevent netrw to load into the built-in terminal
- fix: restore correctly cpo settings
- fix(docs): mispelled original authors name
- chore: move viml files to new formatting standard
fixes: #16463
closes: #16465
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
RestorerZ [Fri, 17 Jan 2025 13:04:44 +0000 (14:04 +0100)]
patch 9.1.1029: the installer can be improved
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: #16378
closes: #16378
Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
John Marriott [Fri, 17 Jan 2025 12:54:49 +0000 (13:54 +0100)]
patch 9.1.1028: too many strlen() calls in screen.c
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>
Jonathon [Fri, 17 Jan 2025 12:37:35 +0000 (13:37 +0100)]
patch 9.1.1027: no sanitize check when running linematch
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>
Luca Saccarola [Fri, 17 Jan 2025 12:03:53 +0000 (13:03 +0100)]
runtime(netrw): change netrw maintainer
Dr. Chip retired some time ago and is no longer maintaining the netrw
plugin. However as a runtime plugin distributed by Vim, it important to
maintain the netrw plugin in the future and fix bugs as they are
reported.
So, split out the netrw plugin as an additional package, however include
some stubs to make sure the plugin is still loaded by default and the
documentation is accessible as well.
closes: #16368
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Thu, 16 Jan 2025 13:37:44 +0000 (14:37 +0100)]
patch 9.1.1020: no way to get current selected item in a async context
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>
Doug Kearns [Mon, 13 Jan 2025 06:54:33 +0000 (07:54 +0100)]
runtime(vim): Split Vim legacy and Vim9 script indent tests
The indent test file is not highlighted correctly as it's currently a
syntactically erroneous mix of legacy and Vim9 script. This is causing
spurious indent test failures as the indent script relies on syntax ID
tests to determine the context of lines being processed.
Splitting the tests into legacy and Vim9 specific files allows for
correct syntax highlighting and indenting.
closes: #16431
Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Mon, 13 Jan 2025 06:27:43 +0000 (07:27 +0100)]
patch 9.1.1011: popupmenu internal error with some abbr in completion item
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: #16427
closes: #16435
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Sun, 12 Jan 2025 08:32:27 +0000 (09:32 +0100)]
patch 9.1.1008: tests: test for patch 9.1.1006 doesn't fail without the patch
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>
Wu, Zhenyu [Sun, 12 Jan 2025 08:27:01 +0000 (09:27 +0100)]
patch 9.1.1007: filetype: various ignore are not recognized
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>
Aliaksei Budavei [Sat, 11 Jan 2025 16:10:06 +0000 (17:10 +0100)]
tests: Load screendump files with "git vimdumps"
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>
glepnir [Sat, 11 Jan 2025 15:47:34 +0000 (16:47 +0100)]
patch 9.1.1006: PmenuMatch completion highlight can be combined
Problem: PmenuMatch completion highlight can be combined
Solution: Combine highlight groups PmenuMatch with Pmenu and
PmenuMatchSel with PmenuSel (glepnir)
fixes: #15563
closes: #16408
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Sat, 11 Jan 2025 15:42:50 +0000 (16:42 +0100)]
patch 9.1.1005: completion text is highlighted even with no pattern found
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>
patch 9.1.1004: tests: a few termdebug tests are flaky
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
patch 9.1.1003: [security]: heap-buffer-overflow with visual mode
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()
patch 9.1.1002: Vim9: unknown func error with interface declaring func var
Problem: Vim9: unknown function error with interface declaring a
function variable (lifepillar)
Solution: Use correct instruction for getting interface member variables
(Yegappan Lakshmanan)
fixes: #16345
closes: #16421
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Fri, 10 Jan 2025 19:08:20 +0000 (20:08 +0100)]
patch 9.1.1001: ComplMatchIns highlight hard to read on light background
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>
patch 9.1.1000: tests: ruby tests fail with Ruby 3.4
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>
Wu, Zhenyu [Wed, 8 Jan 2025 19:20:06 +0000 (20:20 +0100)]
patch 9.1.0998: filetype: TI assembly files are not recognized
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>
John Marriott [Wed, 8 Jan 2025 19:10:59 +0000 (20:10 +0100)]
patch 9.1.0997: too many strlen() calls in drawscreen.c
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>