1
0
forked from aniani/vim

21079 Commits

Author SHA1 Message Date
64-bitman
250739d442
patch 9.1.1213: cannot :put while keeping indent
Problem:  cannot :put while keeping indent
          (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1213
2025-03-16 21:15:11 +01:00
Aliaksei Budavei
7ceca3eb00
runtime(syntax-tests): Support "wait-free" test failure
When certain changes guarantee failure for old syntax tests,
opt for faster failure by reducing the number of screendumps
made for each file "page" to be no greater than the assigned
value of a VIM_SYNTAX_TEST_WAIT_TIME environment variable.
(This variable will be ignored and more screendumps may be
made when Make is GNU Make and a parent Makefile is used.)

Barring regressions, and assuming that v9.1.1163~1 succeeds
in providing a correct synchronisation mechanism outside of
"VerifyScreenDump()", and assuming that "readfile()" always
obtains the latest contents written by "term_dumpwrite()" in
"VerifyScreenDump()"; making a single screendump of a file
"page" and following it with a single reading of the written
screendump file should be enough to decide whether to pass
or fail a syntax test.

In addition, re-enable self testing after v9.1.1183~2.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:59:28 +01:00
John Marriott
34954972c2
patch 9.1.1212: too many strlen() calls in edit.c
Problem:  too many strlen() calls in edit.c
Solution: refactor edit.c and remove strlen() calls
          (John Marriott)

This commit attempts to make edit.c more efficient by:

- in truncate_spaces() pass in the length of the string.
- return a string_T from get_last_insert(), so that the length of the
  string is available to the caller.
- refactor stuff_insert():

  - replace calls to stuffReadbuff() (which calls STRLEN() on it's
    string argument) with stuffReadbuffLen() (which gets the length of
    it's string argument passed in).
  - replace call to vim_strrchr() which searches from the start of the
    string with a loop which searches from end of the string to find the
    last ESC character.

- change get_last_insert_save() to call get_last_insert() to get the
  last_insert string (the logic is in one place).

closes: #16863

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:49:52 +01:00
Eisuke Kawashima
20d23ce93b
patch 9.1.1212: filetype: logrotate'd pacmanlogs are not recognized
Problem:  filetype: logrotate'd pacmanlogs are not recognized
Solution: also detect pacman.log* files as pacmanlog filetype,
          remove BufNewFile autocmd (Eisuke Kawashima)

closes: #16873

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1212
2025-03-16 20:37:14 +01:00
Jonathan
3c7d9b11c8
runtime(prql): include prql syntax script
References:
https://prql-lang.org/
https://github.com/PRQL/prql

closes: #16885

Signed-off-by: Jonathan <vanillajonathan@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:32:13 +01:00
Jim Zhou
bcf66e0141
patch 9.1.1211: TabClosedPre is triggered just before the tab is being freed
Problem:  TabClosedPre is triggered just before the tab is being freed,
          which limited its functionality.
Solution: Trigger it a bit earlier and also on :tabclose and :tabonly
          (Jim Zhou)

closes: #16890

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1211
2025-03-16 20:24:57 +01:00
RestorerZ
21ac3a49b5
patch 9.1.1210: translation(ru): missing Russian translation for the new tutor
Problem:  translation(ru): missing Russian translation for the new tutor
Solution: include new Russian translation, update the Makefile for
          installing the new translations (RestorerZ)

closes: #16901

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1210
2025-03-16 20:03:51 +01:00
Matthias
2c9f49b200
patch 9.1.1209: colorcolumn not drawn after virtual text lines
Problem:  colorcolumn not drawn after virtual text lines
Solution: show colorcolumn on correct line with virtual text by adding
          the size of p_extra to virtual column offset (Matthias)

When a line has two or more lines of virtual text above it, the color
column used to appear on the line of the second virtual text line, while
the first virtual text line and the "real" text line did not have a
color column.

The color column for "above" virtual text is positioned by taking the
offset of the size of the virtual text lines and subtracting it from the
"virtual column" that we are in. If the result equals the color column,
this column is colored.

The "virtual column" is calculated from the beginning of the first
virtual text line and continues over the newlines up to the end of the
"real" text. However, the offset from the virtual text was reset at
every line.

Adding all those offsets together leads to the color column being placed
consistently at the line of the "real" text.

related: #12004
related: #16868
closes: #16904

Signed-off-by: Matthias <matthias.rader@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1209
2025-03-16 19:27:51 +01:00
Christopher Plewright
ab281f8b34
patch 9.1.1208: MS-Windows: not correctly restoring alternate screen on Win 10
Problem:  MS-Windows: not correctly restoring alternate screen on Win 10
          after ssh (Daniel Viberg)
Solution: return a bit later in RestoreConsoleBuffer()
          (Christopher Plewright)

fixes: #16418
closes: #16897

Signed-off-by: Christopher Plewright <chris@createng.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1208
2025-03-16 19:14:31 +01:00
John Marriott
1064426d15
patch 9.1.1207: MS-Windows: build warning in filepath.c
Problem:  MS-Windows: build warning in filepath.c
          (after v9.1.1204)
Solution: add type cast (John Marriott)

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1207
2025-03-16 19:06:31 +01:00
RestorerZ
8322923b40
translation(ru): include Russian translation for chapter two of the tutorial
closes: #16900

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 10:31:10 +01:00
Christian Brabandt
13dcea2df1
runtime(matchparen): line continuation causes failure in CI
so let's remove the line continuation

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 10:24:11 +01:00
Christian Brabandt
63a885b650
patch 9.1.1206: tests: test_filetype fails when a file is a directory
Problem:  tests: test_filetype fails when a file is a directory
          (Eisuke Kawashima)
Solution: When encountering a directory instead of a file, skip that
          particular filetype test

fixes: #16894

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1206
2025-03-15 10:19:48 +01:00
Christian Brabandt
5f2a959553
runtime(doc): symlinking netrw.txt causes problems during install on Windows
So let's remove the symlink and copy the netrw documentation back into
runtime/doc directory. While at it, add a Makefile target to do this
whenever runtime/pack/dist/opt/netrw/doc/netrw.txt is updated.

fixes: #16878
fixes: #16872

Co-authored-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 10:04:39 +01:00
glepnir
84a7503e29
patch 9.1.1205: completion: preinserted text not removed when closing pum
Problem:  completion: preinserted text not removed when closing pum
Solution: delete preinsert text inside in ins_compl_stop() (glepnir).

closes: #16891

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1205
2025-03-15 09:59:22 +01:00
RestorerZ
8021830827
runtime(tutor): updated Russian translation for tutor chapter 1
closes: #16899

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:58:02 +01:00
zeertzjq
00a749bd90
patch 9.1.1204: MS-Windows: crash when passing long string to expand()
Problem:  MS-Windows: crash when passing long string to expand() with
          'wildignorecase'.
Solution: Use the same buflen as unix_expandpath() in dos_expandpath().
          Remove an unnecessary STRLEN() while at it (zeertzjq).

closes: #16896

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1204
2025-03-15 09:53:32 +01:00
Nick Jensen
96395e1512
runtime(cs): Update C# runtime files
closes: #16884

Signed-off-by: Nick Jensen <nickspoon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:50:41 +01:00
zeertzjq
47071c6076
patch 9.1.1203: matchparen keeps cursor on case label in sh filetype
Problem:  matchparen keeps cursor on case label in sh filetype
          (@categorical, after 9.1.1187).
Solution: Use :defer so that cursor is always restored, remove checks
          for older Vims, finish early if Vim does not support :defer

fixes: #16887
closes: #16888

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1203
2025-03-15 09:43:07 +01:00
skshetry
2329bd427a
runtime(doc): fix a typo in gitrebase filetype
Introduced in 4d2c4b90f.

closes: #16892

Signed-off-by: skshetry <18718008+skshetry@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:34:39 +01:00
Hirohito Higashi
3ca914ec74
runtime(doc): Tweak documentation style a bit
closes: #16893

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:32:28 +01:00
Doug Kearns
b55f0221cc
runtime(vim): Sync syntax generator base file with output file.
Synchronisation was lost in commit 0fab891 and the error propagated to
the output file in commit 5606ca5.

closes: #16889

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:30:00 +01:00
Christian Brabandt
f22580e57c
runtime(doc): update a few minor omissions from 5876016 and 4d2c4b9
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-14 12:05:52 +01:00
Jim Zhou
5606ca5349
patch 9.1.1202: Missing TabClosedPre autocommand
Problem:  Missing TabClosedPre autocommand
          (zoumi)
Solution: Add the TabClosedPre autcommand (Jim Zhou).

fixes: #16518
closes: #16855

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1202
2025-03-13 21:58:25 +01:00
glepnir
587601671c
patch 9.1.1201: 'completefuzzycollect' does not handle dictionary correctly
Problem:  'completefuzzycollect' does not handle dictionary correctly
Solution: check for ctrl_x_mode_dictionary (glepnir)

closes: #16867

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1201
2025-03-13 21:39:51 +01:00
zeertzjq
1dc731a49f
runtime(doc): make :h 'completefuzzycollect' a bit clearer
- Fix grammar
- Use "matches" instead of "items" ("completion candidates" is used in
  some other places, but it's a bit verbose)
- "When set" is a bit vague, instead use "For specified modes"

closes: #16871

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 21:30:43 +01:00
Christian Brabandt
4d2c4b90fb
runtime(doc): document gitrebase filetype
closes: #16883

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 21:20:20 +01:00
Antonio Giovanni Colombo
c1c1019fa3
translation(it): update menu_it
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 20:38:44 +01:00
Ivan Pešić
6b01f02712
translation(sr): Add chapter two of the new tutor
Add chapter two to the Serbian translation of the new tutor.
Update the Filelist with two new files.

closes: #16875

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 20:33:26 +01:00
zeertzjq
1830e787f6
patch 9.1.1200: cmdline pum not cleared for input() completion
Problem:  Cmdline pum not cleared for input() completion.
Solution: Temporary reset RedrawingDisabled in cmdline_pum_cleanup(),
          like what is done in wildmenu_cleanup() (zeertzjq).

fixes: #16874
closes: #16876

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1200
2025-03-13 20:29:13 +01:00
Aurelien Gateau
0adbe639a5
patch 9.1.1199: gvim uses hardcoded xpm icon file
Problem:  Many X11/Wayland desktops support icon themes, and many themes
          provide a gvim icon, but this icon is ignored for the window
          itself because it is hardcoded in the source code.
Solution: Read the icon from the theme instead (Aurelien Gateau).

closes: #16859

Signed-off-by: Aurelien Gateau <mail@agateau.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1199
2025-03-12 23:16:42 +01:00
David Mandelberg
54c88d0cf8
runtime(indent-tests): GitHub Actions doesn't show why indent tests failed
Problem:  GitHub Actions doesn't show why indent tests failed
Solution: Send the .fail files to stdout

References:
https://github.com/vim/vim/pull/16852#issuecomment-2719041781

closes: #16870

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 22:43:08 +01:00
Christian Brabandt
f209dcd3de
patch 9.1.1198: [security]: potential data loss with zip.vim
Problem:  [security]: potential data loss with zip.vim and special
          crafted zip files (RyotaK)
Solution: use glob '[-]' to protect filenames starting with '-'

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-693p-m996-3rmf

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1198
2025-03-12 22:04:01 +01:00
glepnir
53b14578e0
patch 9.1.1197: process_next_cpt_value() uses wrong condition
Problem:  process_next_cpt_value() uses wrong condition
Solution: use cfc_has_mode() instead and remove redundant else if branch
          (glepnir)

closes: #16833

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1197
2025-03-12 21:28:39 +01:00
David Mandelberg
7546afbf52
patch 9.1.1196: filetype: config files for container tools are not recognized
Problem:  filetype: config files for container tools are not recognized
Solution: detect the ones that aren't detected yet as toml filetype
          (David Mandelberg)

The .containerignore format doesn't look exactly the same as gitignore,
but very close. And .dockerignore is already using gitignore.

References:
https://github.com/containers/common/blob/main/docs/containerignore.5.md
https://github.com/containers/common/blob/main/docs/containers.conf.5.md
https://github.com/containers/storage/blob/main/docs/containers-storage.conf.5.md
https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md
https://github.com/containers/image/blob/main/docs/containers-registries.conf.d.5.md

I wasn't sure exactly how to interpret what containers.conf(5) was
saying about modules, so I looked at
https://github.com/containers/common/tree/main/pkg/config/testdata/modules
to get examples, and based the detection off those.

closes: #16852

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1196
2025-03-12 21:23:39 +01:00
zeertzjq
c1c3b5d6a0
runtime(doc): remove unnecessary "an"
"umask" is pronounce like "youmask", so having an "an" before it is a
bit strange.  In other places in the help, "umask" is not preceded by
either "a" or "an", and sometimes preceded by "the".

Also, "Note" is usually followed either by ":" or "that" in builtin.txt,
so add a ":" after "Note".

closes: 16860

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 21:16:13 +01:00
Shane Harper
2d18789aa6
patch 9.1.1195: inside try-block: fn body executed with default arg undefined
Problem:  inside try-block: fn body executed when default arg is
          undefined
Solution: When inside a try-block do not execute function body after an
          error in evaluating a default argument expression
          (Shane Harper).

closes: #16865

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1195
2025-03-12 21:12:12 +01:00
Jim Zhou
7db96134c2
runtime(doc): Update doc 52.6
Problem: the highlight-yank plugin exmaple provided in the doc behaves
	 incorrectly when selection is set to exclusive.

Solution: use a unified offset of 1 and pass 'exclusive: false' to
	  getregionpos(), while at it, also clarify when the
          TextYankPost autocommand triggers.

closes: #16866

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 20:57:24 +01:00
Konfekt
23473303b7
runtime(compiler): allow customizing exe and args for tsc
closes: #16853

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:40:04 +01:00
Konfekt
4fa2dd2405
runtime(compiler): add comment for Dispatch
closes: #16854

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:35:48 +01:00
MuntasirSZN
a8aeeeb9aa
runtime(tera): remove unwanted code and fix issues in syntax script
closes: #16857

Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:17:45 +01:00
Christian Brabandt
0a336ccb57
runtime(doc): clarify that a umask is applied to mkdir()
fixes: #16849

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:15:30 +01:00
zeertzjq
6763b0ee95
patch 9.1.1194: filetype: false positive help filetype detection
Problem:  filetype: false positive help filetype detection
Solution: Only detect a file as help if modeline appears either at start
          of line or is preceded by whitespace (zeertzjq).

closes: #16845

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1194
2025-03-10 21:30:29 +01:00
David Mandelberg
c2623824a7
runtime(man): improve :Man completion for man-db
On man-db systems, complete with actual man sections and pages, instead
of shell commands.

I tried to come up with a portable solution for multiple man
implementations in https://github.com/vim/vim/discussions/16794 but I
think the differences between implementations were too large to do that
without overly complicated code. So instead, I implemented it for man-db
(which I think is common on Linux) and hopefully left it easier for
other people to implement it on other systems in the future if they want
to.

closes: #16843

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:26:50 +01:00
zeertzjq
969e11a18b
patch 9.1.1193: Unnecessary use of STRCAT() in au_event_disable()
Problem:  Unnecessary use of STRCAT() in au_event_disable().  STRCAT()
          seeks to the end of new_ei, but here the end is already known.
Solution: Use STRCPY() and add p_ei_len to new_ei.  Also fix a typo in a
          comment.  Add a test that 'eventignore' works in :argdo
          (zeertzjq).

closes: #16844

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1193
2025-03-10 21:15:19 +01:00
Ivan Pešić
835bc014c0
translation(sr): Update Serbian messages translation
closes: #16846

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:13:08 +01:00
Christian Brabandt
8d67cbfa1f
runtime(doc): document vim syntax switches
related: #16727
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:10:22 +01:00
Doug Kearns
0fab89117f
runtime(vim): Update base-syntax, improve :syntax highlighting
- Highlight missing :syntax subcommands.
- Don't highlight user specified syntax group names.

closes: #16847

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:04:53 +01:00
Hirohito Higashi
e671b1b6d1
patch 9.1.1192: Vim crashes with term response debug logging enabled
Problem:  Vim crashes with term response debug logging enabled and
          running in a non-writeable directory
Solution: use ch_log() instead of custom termresponse logging function
          (Hirohito Higashi)

closes: #16840

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1192
2025-03-09 16:35:14 +01:00
Doug Kearns
3dca512939
runtime(vim): Update base-syntax and generator, only match valid predefined variables
- Only match valid predefined and option variables.
- Match scope dictionaries.
- Highlight scope prefixed variables as a scope dictionary accessor. The
  vimVarScope syntax group can be linked to vimVar to disable this.
- Include support for Neovim-only predefined and option variables.

Temporary collateral damage - scope dictionaries match instead of keys
in dictionary literals.

closes: #16727

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:30:28 +01:00