Skip to content

Commit 2a708b9

Browse files
committed
Merge remote-tracking branch 'upstream/master' into tabsidebar
2 parents dd7cd49 + 0adbe63 commit 2a708b9

18 files changed

+139
-56
lines changed

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ SRC_ALL = \
224224
src/testdir/samples/*.html \
225225
src/testdir/samples/*.txt \
226226
src/testdir/samples/*.vim \
227+
src/testdir/samples/poc.zip \
227228
src/testdir/samples/test000 \
228229
src/testdir/samples/test.zip \
229230
src/testdir/samples/test_undo.txt.undo \

runtime/autoload/zip.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
" 2024 Aug 05 by Vim Project: clean-up and make it work with shellslash on Windows
1515
" 2024 Aug 18 by Vim Project: correctly handle special globbing chars
1616
" 2024 Aug 21 by Vim Project: simplify condition to detect MS-Windows
17+
" 2025 Mar 11 by Vim Project: handle filenames with leading '-' correctly
1718
" License: Vim License (see vim's :help license)
1819
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
1920
" Permission is hereby granted to use and distribute this code,
@@ -343,6 +344,11 @@ fun! zip#Extract()
343344
return
344345
endif
345346
let target = fname->substitute('\[', '[[]', 'g')
347+
" unzip 6.0 does not support -- to denote end-of-arguments
348+
" unzip 6.1 (2010) apparently supports, it, but hasn't been released
349+
" so the workaround is to use glob '[-]' so that it won't be considered an argument
350+
" else, it would be possible to use 'unzip -o <file.zip> '-d/tmp' to extract the whole archive
351+
let target = target->substitute('^-', '[&]', '')
346352
if &shell =~ 'cmd' && has("win32")
347353
let target = target
348354
\ ->substitute('[?*]', '[&]', 'g')

runtime/doc/autocmd.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 9.1. Last change: 2025 Mar 08
1+
*autocmd.txt* For Vim version 9.1. Last change: 2025 Mar 12
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1346,6 +1346,10 @@ TextYankPost After text has been yanked or deleted in the
13461346
called recursively.
13471347
It is not allowed to change the buffer text,
13481348
see |textlock|. *E1064*
1349+
Also triggered indirectly when Vim tries to
1350+
become owner of the Visual selection because
1351+
of setting "autoselect" for 'guioptions' or
1352+
'clipboard'.
13491353
{only when compiled with the +eval feature}
13501354

13511355
*User*

runtime/doc/builtin.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7588,7 +7588,7 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E739*
75887588
the new directory. The default is 0o755 (rwxr-xr-x: r/w for
75897589
the user, readable for others). Use 0o700 to make it
75907590
unreadable for others. This is used for the newly created
7591-
directories. Note an umask is applied to {prot} (on Unix).
7591+
directories. Note: umask is applied to {prot} (on Unix).
75927592
Example: >
75937593
:call mkdir($HOME .. "/tmp/foo/bar", "p", 0o700)
75947594

runtime/doc/options.txt

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 9.1. Last change: 2025 Mar 07
1+
*options.txt* For Vim version 9.1. Last change: 2025 Mar 12
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2107,14 +2107,23 @@ A jump table for the options with a short description can be found at |Q_op|.
21072107
*'completefuzzycollect'* *'cfc'*
21082108
'completefuzzycollect' 'cfc' string (default: empty)
21092109
global
2110-
This option enables fuzzy collection for (only some) specific
2111-
|ins-completion| modes, adjusting how items are gathered for fuzzy
2112-
matching based on input.
2113-
The option can contain the following values (separated by commas),
2114-
each enabling fuzzy collection for a specific completion mode:
2115-
files file names
2116-
keyword keyword completion in 'complete' and current file
2117-
whole_line whole lines
2110+
A comma-separated list of option enables fuzzy collection for specific
2111+
|ins-completion| modes, affecting how items are gathered during
2112+
completion. When set, fuzzy matching is used to find completion
2113+
candidates instead of the standard prefix-based matching. This option
2114+
can contain the following values are:
2115+
2116+
keyword keywords in the current file |i_CTRL-X_CTRL-N|
2117+
keywords with the ".", "w", "b", "u", "U" and
2118+
"k{dict}" flags in 'complete'. |i_CTRL-N| |i_CTRL-P|
2119+
2120+
files file names |i_CTRL-X_CTRL-F|
2121+
2122+
whole_line whole lines |i_CTRL-X_CTRL-L|
2123+
2124+
When used with 'completeopt' "longest" option, fuzzy collection can
2125+
identify the longest common string among the best fuzzy matches and
2126+
automatically insert it.
21182127

21192128
*'completeitemalign'* *'cia'*
21202129
'completeitemalign' 'cia' string (default: "abbr,kind,menu")

runtime/doc/usr_52.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*usr_52.txt* For Vim version 9.1. Last change: 2024 Oct 07
1+
*usr_52.txt* For Vim version 9.1. Last change: 2025 Mar 12
22

33
VIM USER MANUAL - by Bram Moolenaar
44

@@ -362,11 +362,10 @@ and it will be active next time you start Vim. |add-plugin|: >
362362
endif
363363
var [beg, end] = [getpos("'["), getpos("']")]
364364
var type = v:event.regtype ?? 'v'
365-
var pos = getregionpos(beg, end, {type: type})
366-
var end_offset = (type == 'V' || v:event.inclusive) ? 1 : 0
365+
var pos = getregionpos(beg, end, {type: type, exclusive: false})
367366
var m = matchaddpos(hlgroup, pos->mapnew((_, v) => {
368367
var col_beg = v[0][2] + v[0][3]
369-
var col_end = v[1][2] + v[1][3] + end_offset
368+
var col_end = v[1][2] + v[1][3] + 1
370369
return [v[0][1], col_beg, col_end - col_beg]
371370
}))
372371
var winid = win_getid()

runtime/filetype.vim

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim support file to detect file types
22
"
33
" Maintainer: The Vim Project <https://github.com/vim/vim>
4-
" Last Change: 2025 Mar 10
4+
" Last Change: 2025 Mar 12
55
" Former Maintainer: Bram Moolenaar <[email protected]>
66

77
" Listen very carefully, I will say this only once
@@ -395,6 +395,12 @@ au BufNewFile,BufRead *.cdl setf cdl
395395
" Conary Recipe
396396
au BufNewFile,BufRead *.recipe setf conaryrecipe
397397

398+
" Containers config files
399+
au BufNewFile,BufRead */containers/containers.conf{,.d/*.conf} setf toml
400+
au BufNewFile,BufRead */containers/containers.conf.modules/*.conf setf toml
401+
au BufNewFile,BufRead */containers/registries.conf{,.d/*.conf} setf toml
402+
au BufNewFile,BufRead */containers/storage.conf setf toml
403+
398404
" Corn config file
399405
au BufNewFile,BufRead *.corn setf corn
400406

@@ -963,7 +969,7 @@ au BufNewFile,BufRead */etc/gitattributes setf gitattributes
963969
au BufNewFile,BufRead .gitignore,*.git/info/exclude setf gitignore
964970
au BufNewFile,BufRead */.config/git/ignore,*.prettierignore setf gitignore
965971
au BufNewFile,BufRead */.config/fd/ignore,.fdignore,.ignore setf gitignore
966-
au BufNewFile,BufRead .rgignore,.dockerignore setf gitignore
972+
au BufNewFile,BufRead .rgignore,.dockerignore,.containerignore setf gitignore
967973
au BufNewFile,BufRead .npmignore,.vscodeignore setf gitignore
968974
au BufNewFile,BufRead git-rebase-todo setf gitrebase
969975
au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail

runtime/indent/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ VIMRUNTIME = ..
1010
# If a test succeeds a testdir/*.out file will be written.
1111
# If a test fails a testdir/*.fail file will be written.
1212
test:
13-
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term -u testdir/runtest.vim
13+
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term -u testdir/runtest.vim || \
14+
{ \
15+
retval=$$?; \
16+
for fail in testdir/*.fail; do \
17+
[ -f "$$fail" ] || continue; \
18+
echo "$$fail:"; \
19+
cat "$$fail"; \
20+
done; \
21+
exit $$retval; \
22+
}
1423
@echo "INDENT TESTS: DONE"
1524

1625

src/gui_gtk_x11.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,10 +2704,6 @@ global_event_filter(GdkXEvent *xev,
27042704
static void
27052705
mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
27062706
{
2707-
#include "../runtime/vim32x32.xpm"
2708-
#include "../runtime/vim16x16.xpm"
2709-
#include "../runtime/vim48x48.xpm"
2710-
27112707
GdkWindow * const mainwin_win = gtk_widget_get_window(gui.mainwin);
27122708

27132709
// When started with "--echo-wid" argument, write window ID on stdout.
@@ -2725,17 +2721,7 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
27252721
/*
27262722
* Add an icon to the main window. For fun and convenience of the user.
27272723
*/
2728-
GList *icons = NULL;
2729-
2730-
icons = g_list_prepend(icons, gdk_pixbuf_new_from_xpm_data((const char **)vim16x16));
2731-
icons = g_list_prepend(icons, gdk_pixbuf_new_from_xpm_data((const char **)vim32x32));
2732-
icons = g_list_prepend(icons, gdk_pixbuf_new_from_xpm_data((const char **)vim48x48));
2733-
2734-
gtk_window_set_icon_list(GTK_WINDOW(gui.mainwin), icons);
2735-
2736-
// TODO: is this type cast OK?
2737-
g_list_foreach(icons, (GFunc)(void *)&g_object_unref, NULL);
2738-
g_list_free(icons);
2724+
gtk_window_set_icon_name(GTK_WINDOW(gui.mainwin), "gvim");
27392725
}
27402726

27412727
#if !defined(USE_GNOME_SESSION)

src/insexpand.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3671,7 +3671,7 @@ process_next_cpt_value(
36713671
ins_compl_next_state_T *st,
36723672
int *compl_type_arg,
36733673
pos_T *start_match_pos,
3674-
int in_fuzzy)
3674+
int fuzzy_collect)
36753675
{
36763676
int compl_type = -1;
36773677
int status = INS_COMPL_CPT_OK;
@@ -3687,7 +3687,7 @@ process_next_cpt_value(
36873687
st->first_match_pos = *start_match_pos;
36883688
// Move the cursor back one character so that ^N can match the
36893689
// word immediately after the cursor.
3690-
if (ctrl_x_mode_normal() && (!in_fuzzy && dec(&st->first_match_pos) < 0))
3690+
if (ctrl_x_mode_normal() && (!fuzzy_collect && dec(&st->first_match_pos) < 0))
36913691
{
36923692
// Move the cursor to after the last character in the
36933693
// buffer, so that word at start of buffer is found
@@ -4487,7 +4487,6 @@ ins_compl_get_exp(pos_T *ini)
44874487
int i;
44884488
int found_new_match;
44894489
int type = ctrl_x_mode;
4490-
int in_fuzzy = (get_cot_flags() & COT_FUZZY) != 0;
44914490

44924491
if (!compl_started)
44934492
{
@@ -4528,7 +4527,7 @@ ins_compl_get_exp(pos_T *ini)
45284527
if ((ctrl_x_mode_normal() || ctrl_x_mode_line_or_eval())
45294528
&& (!compl_started || st.found_all))
45304529
{
4531-
int status = process_next_cpt_value(&st, &type, ini, in_fuzzy);
4530+
int status = process_next_cpt_value(&st, &type, ini, cfc_has_mode());
45324531

45334532
if (status == INS_COMPL_CPT_END)
45344533
break;

0 commit comments

Comments
 (0)