1
0
forked from aniani/vim

21079 Commits

Author SHA1 Message Date
Yee Cheng Chin
bc08ceb755
patch 9.1.1165: diff: regression with multi-file diff blocks
Problem:  Vim's diff block merging algorithm when doing a multi-file diff
          is buggy when two different diff hunks overlap a single
          existing diff block (after v9.1.0743)

Solution: fix a couple bugs in this logic:

1. Fix regression from v9.1.0743 where it's not correctly expanding the
   2nd overlap correctly, where it always expands without taking into
   account that this was always taken care of when the first overlap
   happened. Instead, we should only grow the 2nd overlap if it overhangs
   outside the existing diff block, and if we encounter a new overlapping
   diff block (due to overlap chaining).
2. When we expand a diff block to match the hunk size on the orig side
   (when handling the first overlap), we expand the same amount of lines
   in the new side. This is not sound if there exists a second overlap
   hunk that we haven't processed yet, and that hunk has different
   number of lines in orig/new. Fix this by doing the corresponding
   counter adjustment when handling 2nd/3rd/etc overlap by calculating
   the difference in lines between orig and new side.
   (Yee Cheng Chin)

closes: #16768

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1165
2025-03-02 22:05:37 +01:00
Christian Brabandt
334a13bff7
patch 9.1.1164: [security]: code execution with tar.vim and special crafted tar files
Problem:  editing a special crafted tar file allows code execution
          (RyotaK, after 129a8446d23cd9cb4445fcfea259cba5e0487d29)
Solution: escape the filename before feeding it to the `:read` command

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-wfmf-8626-q3r3

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1164
2025-03-02 19:37:29 +01:00
Antonio Giovanni Colombo
8872012e5f
translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 17:27:37 +01:00
Christian Brabandt
8ac975d97e
runtime(tar): fix syntax error in tar.vim
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 17:13:40 +01:00
Christian Brabandt
1a741d3cb8
patch 9.1.1163: $MYVIMDIR is set too late
Problem:  $MYVIMDIR is set too late and not available while sourcing
          runtime files (Maxim Kim, after v9.1.1159)
Solution: Also set it when $MYVIMRC file is found

fixes: #16764
closes: #16767

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1163
2025-03-01 16:30:33 +01:00
Aliaksei Budavei
7003a5d63f
runtime(syntax-tests): Apply stronger synchronisation between buffers
The current lightweight synchronisation with ":redraw" needs further
reinforcement in the light of v9.1.1110.  And, with v9.1.0820, make
another synchronisation point _before_ the first (or only) screenful is
dumped.

Also add a script to regenerate all screendumps.

closes: #16632

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 16:28:20 +01:00
glepnir
ff159253eb
patch 9.1.1162: completion popup not cleared in cmdline
Problem:  When an info popup spans into the cmdline area and ESC is
          pressed, some content remains visible on screen (yu3s)
Solution: Add popup_overlays_cmdline() check in screen_fill() to prevent
          prematurely clearing the clear_cmdline flag (glepnir).

fixes: #15627
closes: #16765

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1162
2025-03-01 16:19:44 +01:00
glepnir
94a045ed56
patch 9.1.1161: preinsert requires bot "menu" and "menuone" to be set
Problem:  preinsert requires bot "menu" and "menuone" to be set,
          but "menu" is redundant (after v9.1.1160)
Solution: preinsert only requires menuone (glepnir)

closes: #16763

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1161
2025-03-01 16:12:23 +01:00
Jim Zhou
56957ed410
runtime(misc): add support for bzip3 to tar, vimball and gzip plugins
fixes: #16751
closes: #16755

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-28 18:06:14 +01:00
glepnir
a2c5559f29
patch 9.1.1160: Ctrl-Y does not work well with "preinsert" when completing items
Problem:  The 'preinsert' feature requires Ctrl-Y to confirm insertion,
          but Ctrl-Y only works when the popup menu (pum) is displayed.
          Without enforcing this dependency, it could lead to confusing
          behavior or non-functional features.

Solution: Modify ins_compl_has_preinsert() to check for both 'menu' and
          'menuone' flags when 'preinsert' is set. Update documentation
          to clarify this requirement. This avoids adding complex
          conditional behaviors. (glepnir)

fixes: #16728
closes: #16753

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1160
2025-02-28 17:43:42 +01:00
Christian Brabandt
3e2affc324
patch 9.1.1159: $MYVIMDIR may not always be set
Problem:  $MYVIMDIR may not always be set (after 9.1.0718)
          (sandwm)
Solution: always set $MYVIMDIR to first item in runtimepath
          (except when using --clean), update it when changing &rtp

fixes: #16609
closes: #16709

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1159
2025-02-28 17:34:46 +01:00
zeertzjq
5e8b2268e1
patch 9.1.1158: :verbose set has wrong file name with :compiler!
Problem:  :verbose set has wrong file name with :compiler!
Solution: Add -keepscript (zeertzjq)

closes: #16752

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1158
2025-02-28 17:32:07 +01:00
Luca Saccarola
da53af57a7
runtime(netrw): correctly handle shellslash variable
closes: #16758

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-28 17:30:25 +01:00
Jim Zhou
3255af850e
patch 9.1.1157: command completion wrong for input()
Problem:  command completion wrong for input()
          (Cdrman Fu)
Solution: Set commandline completion context explicitly
          (Jim Zhou)

fixes #16723
closes: #16733

Signed-off-by: Jim Zhou <csd_189@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1157
2025-02-27 19:29:50 +01:00
zeertzjq
85a50fe825
runtime(doc): fix confusing docs for 'completeitemalign'
closes: #16743

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:24:32 +01:00
zeertzjq
4be1ab80be
patch 9.1.1156: tests: No test for what patch 9.1.1152 fixes
Problem:  No test for what patch 9.1.1152 fixes.
Solution: Add a test (zeertzjq).

closes: #16742

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1156
2025-02-27 19:22:26 +01:00
zeertzjq
fce1fa5b61
patch 9.1.1155: Mode message not cleared after :silent message
Problem:  Mode message not cleared after :silent message
          (after 9.0.1634).
Solution: Don't reset mode_displayed when the message is empty.
          (zeertzjq)

fixes: neovim/neovim#32641
closes: #16744

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1155
2025-02-27 19:19:36 +01:00
Doug Kearns
0b8205484b
runtime(lua): Improve 'include' and make '*expr' functions script-local
- Prevent 'include' from matching variable assignments as calls to
  require() and others.
- Use script-local functions for 'includeexpr' and 'foldexpr'.
- Formatting fixes.

closes: #16746

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:17:33 +01:00
Doug Kearns
60bd140256
runtime(vim): Update base-syntax, match Vim9 function calls after "|"
Match Vim9 function calls after ex-bar.  These are also currently
matched but invalid syntax for legacy script.

fixes: #16721
closes: #16747

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:15:20 +01:00
Yegappan Lakshmanan
e9ae35f265
patch 9.1.1154: Vim9: not able to use autoload class accross scripts
Problem:  Vim9: not able to use autoload class accross scripts
Solution: make it work, re-enable the test (Yegappan Lakshmanan)

fixes: #15031
closes: #16748

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1154
2025-02-27 19:12:00 +01:00
Konfekt
3d75ec7401
runtime(compiler): improve svelte-check
closes: #16749

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:09:52 +01:00
Begasus
dbedc0924d
patch 9.1.1153: build error on Haiku
Problem:  build error on Haiku
Solution: define XDG_RUNTIME_PATH variables
          (Begasus)

closes: #16737

Signed-off-by: Begasus <begasus@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1153
2025-02-26 22:26:16 +01:00
John Marriott
18bacc811c
patch 9.1.1152: Patch v9.1.1151 causes problems
Problem:  Patch v9.1.1151 causes problems
Solution: partially revert it (John Marriott)

closes: #16736

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1152
2025-02-26 19:14:06 +01:00
RestorerZ
397700e507
runtime(new-tutor): update examples from Neovim to Vim
closes: #16741

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-26 19:00:48 +01:00
Rafael Fontenelle
b2bd8de154
nsis: add Portuguese Brazilian translation to nsis installer
closes: #16692

Co-authored-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 21:05:22 +01:00
John Marriott
d3c4b7e946
patch 9.1.1151: too many strlen() calls in getchar.c
Problem:  too many strlen() calls in getchar.c
Solution: store last inserted and recorded lengths,
          add functions to retrieve those and use those
          functions (John Marriott)

closes: #16720

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1151
2025-02-25 20:56:38 +01:00
Konfekt
580e457a2a
runtime(vim): make VimKeywordPrg even smarter for regexes
closes: #16729

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:53:55 +01:00
Yee Cheng Chin
9b41e8f766
patch 9.1.1150: :hi completion may complete to wrong value
Problem:  :highlight auto-complettion has a minor bug where an existing
          highlight group with a cterm color being unset would result in
          it being auto-completed to -1 in cmdline which is invalid.

Solution: Correctly check for whether an int value is set to non-zero
          before retrieving the existing value for auto-complete. Also
          do this for attr/string values as they previously worked only
          by accident (Yee Cheng Chin).

closes: #16726

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1150
2025-02-25 20:41:52 +01:00
RestorerZ
aa8345a968
patch 9.1.1149: Unix Makefile does not support Brazilian lang for the installer
Problem:  Unix Makefile does not support Brazilian lang for the
          installer
Solution: add support for language code pt_br (RestorerZ)

This is in preparation of the Portuguese Brazilian translation
that will be merged a bit later.

related: #16692
closes: #16732

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1149
2025-02-25 20:35:41 +01:00
Hirohito Higashi
6c0128385e
patch 9.1.1148: Vim9: finding imported scripts can be further improved
Problem:  Vim9: finding imported scripts can be further improved
          (after v9.1.1146)
Solution: Eliminate extra find_imported() call (Hirohito Higashi)

related: #16602
related: #16660
closes: #16731

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1148
2025-02-25 20:29:50 +01:00
brianhuster
00a00f5d3f
runtime(lua): Update lua ftplugin and documentation
Problem:
- The doc says the default `g:lua_subversion` is 2, but in fact it is 3
  (see `runtime/syntax/lua.vim`)
- `includeexpr` doesn't work with module in `init.lua`

Solution:
- Update documentation
- Assign value to option `&include`
- Add function `LuaInclude` and assign it to `l:&includeexpr`

closes: #16655

Co-authored-by: dkearns <dougkearns@gmail.com>
Signed-off-by: brianhuster <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:26:45 +01:00
Girish Palya
12b1eb58ab
patch 9.1.1147: preview-window does not scroll correctly
Problem:  preview-window does not scroll correctly
Solution: init firstline = 0 for a preview window
          (Girish Palya)

The 'info' window, which appears during insert-mode completion to display
additional information, was not scrolling properly when using commands like:
	win_execute(popup_findinfo(), "normal! \<PageDown>")
This issue made it impossible to navigate through info window contents using
keyboard-based scrolling.
The fix correctly updates the w_firstline value of the popup window, ensuring
proper scrolling behavior. Mouse scrolling was already working as expected and
remains unaffected.

closes: #16703

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1147
2025-02-24 21:39:42 +01:00
RestorerZ
f877040a04
nsis: added support for pt-BR to installer and update README.txt
Prepare for PR #16692 which will eventually bring pt-br translation to
the installer and add some clarification on how to test the installer
with different languages

closes: #16725

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-24 19:42:36 +01:00
Emir SARI
25b16d64a0
translation(tr): Update Turkish translations
closes: #16719

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-24 19:31:06 +01:00
Yegappan Lakshmanan
16f2d3a465
patch 9.1.1146: Vim9: wrong context being used when evaluating class member
Problem:  Vim9: wrong context being used when evaluating class member
          (lifepillar, Ernie Rael)
Solution: Use the correct script context when evaluating a class member
          init expression(Yegappan Lakshmanan)

fixes: #14011
fixes: #14402
closes: #15112
closes: #16660

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1146
2025-02-24 19:26:56 +01:00
glepnir
5090a1fecb
patch 9.1.1145: multi-line completion has wrong indentation for last line
Problem:  When expanding omni completion items with newlines (e.g.
          `then\n\t\nend`), the end statement gets wrong indentation.
Solution: Add OPENLINE_FORCE_INDENT flag to make open_line() use
          second_line_indent directly (glepnir)

closes: #16614

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Justin M. Keyes <justinkz@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1145
2025-02-24 19:10:37 +01:00
Luca Saccarola
5b97947bbd
runtime(netrw): runtime(netrw): upstream snapshot of v178
relevant commits:
- refactor: netrw#own#Deprecate -> netrw#msg#Deprecate
- refactor: netrw#own#PathJoin -> netrw#fs#PathJoin
- fix: typos
- refactor: netrw#own#Open -> netrw#os#Open
- deprecate!: netrw#WinPath
- refactor: netrw#WinPath -> netrw#fs module
- refactor: s:ShellEscape -> netrw#os module
- refactor: s:NetrwExe -> netrw#os module
- refactor: s:NetrwGlob -> netrw#fs module
- refactor: s:NetrwGetcwd -> netrw#fs module
- refactor: s:NetrwFullPath -> netrw#fs module
- refactor: s:ComposePath -> netrw#fs module

closes: #16718

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 20:37:39 +01:00
Bakudankun
b3854bfc54
patch 9.1.1144: no way to create raw strings from a blob
Problem:  no way to create raw strings from a blob
Solution: support the "encoding": "none" option
          to create raw strings (which may be invalid!)
          (Bakudankun)

closes: #16666

Signed-off-by: Bakudankun <bakudankun@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1144
2025-02-23 20:29:21 +01:00
Christian Brabandt
e0029daa35
patch 9.1.1143: illegal memory access when putting a register
Problem:  illegal memory access when putting a register
Solution: make sure cursor column doesn't become negative

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1143
2025-02-23 20:01:54 +01:00
Christian Brabandt
28155d0855
patch 9.1.1142: tests: test_startup fails if $HOME/$XDG_CONFIG_HOME is defined
Problem:  tests: test_startup fails if $HOME/$XDG_CONFIG_HOME is defined
Solution: define $HOME and $XDG_CONFIG_HOME to some non-existing
          directory

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1142
2025-02-23 19:55:09 +01:00
Konfekt
094494bf2e
runtime(vim): improve &keywordprg in ftplugin
- let keywordprg in vim filetype handle context-sensitive help calls by
  detecting the syntax group of the word under the cursor
- reformat whitespace
- add modeline

related: #16677
closes: #16680

Co-authored-by: Andrew Radev <andrey.radev@gmail.com>
Co-authored-by: "D. Ben Knoble" <ben.knoble+github@gmail.com>
Co-authored-by: Gary Johnson <garyjohn@spocom.com>
Co-authored-by: Tim Pope <code@tpope.net>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 16:03:30 +01:00
Doug Kearns
025dc48e88
runtime(vim): Update base-syntax, match :CompilerSet and :SynMenu commands
closes: #16713

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 15:48:52 +01:00
zeertzjq
b8989fb860
patch 9.1.1141: Misplaced comment in readfile()
Problem:  Misplaced comment in readfile().
          (after v9.1.1139)
Solution: Move the comment above S_ISDIR().
          (zeertzjq)

closes: #16714

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1141
2025-02-23 09:56:10 +01:00
David Mandelberg
ed7d8e55ac
patch 9.1.1140: filetype: m17ndb files are not detected
Problem:  filetype: m17ndb files are not detected
Solution: detect m17ndb files as m17ndb filetype,
          include filetype, syntax and indent files for the
          new filetype (David Mandelberg).

References:

https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the
format. https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/tree/ has
examples of the files.

closes: #16696

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1140
2025-02-23 09:41:42 +01:00
Christian Brabandt
f1c3134ee1
patch 9.1.1139: [fifo] is not displayed when editing a fifo
Problem:  [fifo] is not displayed when editing a fifo
          (after v7.4.2189)
Solution: stat the filename and detect the type correctly

fixes: #16702
closes: #16705

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1139
2025-02-23 09:36:56 +01:00
Yee Cheng Chin
a7b8120820
patch 9.1.1138: cmdline completion for :hi is too simplistic
Problem:  Existing cmdline completion for :highlight was barebone and
          only completed the highlight group names.

Solution: Implement full completion for the highlight group arguments
          such as guifg and cterm. If the user tries to complete
          immediately after the '=' (e.g. `hi Normal guifg=<Tab>`), the
          completion will fill in the existing value, similar to how
          cmdline completion for options work (Yee Cheng Chin).

closes: #16712

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1138
2025-02-23 09:34:50 +01:00
John Marriott
f4b36417e8
patch 9.1.1137: ins_str() is inefficient by calling STRLEN()
Problem:  ins_str() is inefficient by calling STRLLEN()
Solution: refactor ins_str() to take a length argument
          and let all callers provide the correct length
          when calling ins_str() (John Marriott)

closes: #16711

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.1137
2025-02-23 09:09:59 +01:00
Philip H.
066a5340e3
CI: Install netbeans on windows to make sure to run test_netbeans.vim
otherwise the test src/testdir/test_netbeans.vim wouldn't be executed by
the CI.

closes: #16710

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 08:50:54 +01:00
David Mandelberg
61af587f26
runtime(dockerfile): set comments in filetype plugin
closes: #16698

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Honza Pokorny <honza@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 15:09:03 +01:00
Konfekt
d15114c148
runtime(compiler): include svelte-check compiler
closes: #16704

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 15:07:09 +01:00