1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-16 14:57:52 +01:00
Commit graph

20928 commits

Author SHA1 Message Date
Luuk van Baal
7bbb0f357e
patch 9.1.1136: Match highlighting marks a buffer region as changed
Problem:  Match highlighting marks a buffer region to be redrawn as if
          its buffer text was changed, unnecessarily invoking syntax code.
Solution: Set the `w_redraw_top/bot` variables instead of the b_mod_* ones
          (Luuk van Baal)

closes: 

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 09:19:04 +01:00
zeertzjq
bf595ae4ac
patch 9.1.1135: 'suffixesadd' doesn't work with multiple items
Problem:  'suffixesadd' doesn't work with multiple items
          (after 9.1.1122).
Solution: Don't concat multiple suffixes together.
          (zeertzjq)

fixes: 
closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 09:13:17 +01:00
Christian Brabandt
51eefba1d6
runtime(filetype): move filetype detection into filetypedetect augroup
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 08:48:06 +01:00
Christ van Willegen
6a15942bc2
CI: add Makefile target to verify default highlighting groups are present
When adding new highlight groups, one needs to make sure to also add a
"default link NewHlGroup ExistingHlGroup" in highlight.c code, so that
when resetting a color scheme the old color won't be left behind.

So add a Makefile in the 'ci' directory that verifies that all
documented '*hl-<groupname>' from the documentation are either reflected
in the source code, or belong to a list of 'known to be ignored'
highlight groups and let that check run as part of the CI test suite.

related: 
closes: 

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 20:23:26 +01:00
David Mandelberg
41a6026f00
patch 9.1.1134: filetype: Guile init file not recognized
Problem:  filetype: Guile init file not recognized
Solution: detect '.guile' file as scheme filetype
          (David Mandelberg)

References:

https://www.gnu.org/software/guile/manual/html_node/Init-File.html
> When run interactively, Guile will load a local initialization file
> from ~/.guile. This file should contain Scheme expressions for
> evaluation.

closes: 

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 20:13:54 +01:00
David Mandelberg
b62bf81488
patch 9.1.1133: filetype: xkb files not recognized everywhere
Problem:  filetype: xkb files not recognized everywhere
Solution: detect xkb files in more places
          (David Mandelberg)

References:
https://xkbcommon.org/doc/current/user-configuration.html#user-config-locations

closes: 

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 20:09:35 +01:00
zeertzjq
060e6556e2
patch 9.1.1132: Mark positions wrong after triggering multiline completion
Problem:  Mark positions wrong after triggering multiline completion.
Solution: Call deleted_lines_mark() after deleting lines.
          (zeertzjq)

closes: 

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 20:06:26 +01:00
John Marriott
b79fa3d9c8
patch 9.1.1131: potential out-of-memory issue in search.c
Problem:  potential out-of-memory issue in search.c
Solution: improve situation and refactor search.c slightly
          (John Marriott)

- In function update_search_stat():
  add a check for a theoretical null pointer reference, set and remember
  the length of lastpat, remove the three calls to STRLEN() and use the
  various string's associated lengths instead, add a check for an
  out-of-memory condition.

- In function search_for_fuzz_match():
  remove a call to strnsave() and thus avoid having to add a check for
  an out-of-memory condition, also replace the call to STRLEN() by
  ml_get_buf_len().

closes: 

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 19:59:56 +01:00
glepnir
a48693c6c2
runtime(doc): remove resolved complete item from todo list
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 19:52:13 +01:00
zeertzjq
13f100e932
patch 9.1.1130: 'listchars' "precedes" is not drawn on Tabs.
Problem:  'listchars' "precedes" is not drawn on Tabs.
Solution: Only draw 'listchars' "precedes" when not skipping over cells.
          (zeertzjq)

fixes: 
closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 19:49:44 +01:00
David Mandelberg
3cb41489dc
runtime(sieve): set fileformat=dos in filetype plugin
References:
https://datatracker.ietf.org/doc/html/rfc5228#section-2.2

closes: 

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 23:22:54 +01:00
John Marriott
fbe2dd7b4c
patch 9.1.1129: missing out-of-memory test in buf_write()
Problem:  missing out-of-memory test in buf_write()
Solution: Check that the returned allocated buffer is not NULL
          (John Marriott)

closes: 

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 23:17:09 +01:00
Lucas Eekhof
27f5136761
runtime(mail): add commentstring '> %s' to ftplugin
The new native commenting functionality is currently not used when
editing mail. One could reasonably expect it to change the "quote" state
of any given line in the mail (i.e. the preceding ">"), which would be
very handy and feel natural when editing mail. Especially since the
current file already uses "setlocal comments+=n:>".

Solution: Add commentstring to `> %s` to be used in files of type mail.

closes: 

Signed-off-by: Lucas Eekhof <105216949+eekhof@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:32:07 +01:00
Yegappan Lakshmanan
e3fed4828c
patch 9.1.1128: patch 9.1.1119 caused a regression with imports
Problem:  patch 9.1.1119 caused a regression with imports
          (girishji)
Solution: revert the script ID change for the class script variable for
          now (Yegappan Lakshmanan)

fixes: 
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:20:54 +01:00
dringsim
106899eb21
runtime(dnsmasq): include simple filetype plugin
closes: 

Signed-off-by: dringsim <dringsim@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:19:23 +01:00
glepnir
52fd867f5e
patch 9.1.1127: preinsert text is not cleaned up correctly
Problem:  when 'completeopt' is set to preinsert the preinserted text is
          not cleared when adding new leader (Yee Cheng Chin)
Solution: add a condition to delete preinsert text in edit function
          (glepnir)

closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:13:24 +01:00
glepnir
4418041698
patch 9.1.1126: patch 9.1.1121 used a wrong way to handle enter
Problem:  patch 9.1.1121 used a wrong way to handle enter
Solution: compl_enter_selects also needs to consider the selected item
          in ins_compl_new_leader() (glepnir)

closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:09:48 +01:00
glepnir
3af0a8d8f5
patch 9.1.1125: cannot loop through pum menu with multiline items
Problem:  cannot loop through pum menu with multiline items with
          fuzzy and noselect in 'completeopt' (Tomasz N)
Solution: remove unnecessary compl_no_select condition (glepnir)

fixes: 
closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:06:16 +01:00
zeertzjq
08a83a033a
patch 9.1.1124: No test for 'listchars' "precedes" with double-width char
Problem:  No test for 'listchars' "precedes" with double-width char.
Solution: Add a test and fix a typo in code (zeertzjq).

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:04:09 +01:00
Yee Cheng Chin
e700ddeea4
patch 9.1.1123: popup hi groups not falling back to defaults
Problem:  Highlight groups PopupSelected/PopupNotification/
          MessageWindow are supposed to fall back to default highlight
          groups if they are not defined. However, once a colorscheme
          has defined them, switching to another colorscheme that
          doesn't do so will leave behind a cleared colorscheme, which
          causes the fallback to fail.

Solution: Set up default links to the relevant fallback highlight
          groups, which makes sure a `:hi clear` command will reset the
          state properly (Yee Cheng Chin).

closes: 

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 21:58:21 +01:00
David Mandelberg
911742a975
runtime(dosini): Add support for # comments to ftplugin
runtime/syntax/dosini.vim supports both ; and # as comments, and I think
a bunch of the files detected as dosini do too, so add support for # to
the ftplugin.

closes: 

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 20:43:10 +01:00
John Marriott
d6e3c9048d
patch 9.1.1122: too many strlen() calls in findfile.c
Problem:  too many strlen() calls in findfile.c
Solution: refactor findfile.c and remove calls to strlen()
          (John Marriott)

closes: 

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:45:48 +01:00
glepnir
07f0dbe3aa
patch 9.1.1121: Enter does not insert newline with "noselect"
Problem:  Enter does not insert newline with "noselect" when the pum is
          visible (lifepillar)
Solution: When Enter is pressed and no complete-item is selected,
          ins_compl_prep returns false, and the edit function continues
          processing Enter to insert a new line. (glepnir)

fixes: 
closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:27:30 +01:00
Luca Saccarola
ee1a24b21d
runtime(netrw): fix s:NetrwHome() regression
If $MYVIMDIR is unset netrw creates a directory called '$MYVIMDIR' in
the current directory

fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:11:51 +01:00
Christian Brabandt
44c1c04ddb
patch 9.1.1120: tests: Test_registers fails
Problem:  tests: Test_registers fails
          (T.J. Townsend, after v9.1.1115)
Solution: require clipboard feature

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 22:27:45 +01:00
Christian Brabandt
5647c91355
runtime(doc): add reference to extendnew() at extend()
related: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 21:33:30 +01:00
Yegappan Lakshmanan
778ada48fb
patch 9.1.1119: Vim9: Not able to use an autoloaded class from another autoloaded script
Problem:  Vim9: Not able to use an autoloaded class from another
          autoloaded script (Elliot)
Solution: make it work (Yegappan Lakshmanan)

fixes: 
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 20:21:23 +01:00
Christian Brabandt
b34a688ba0
patch 9.1.1118: tests: test_termcodes fails
Problem:  tests: test_termcodes fails
          (after: v9.1.1114)
Solution: adjust the test for the expected termguicolors value

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 20:09:11 +01:00
Doug Kearns
68ba6c2c6c
runtime(vim): Update base-syntax, improve performance
Contain the vimNotation syntax group, matching this at top level is
unnecessary and very slow.

The removed vimString and vimNumber definitions are broken and/or never
match. They have long been replaced by newer definitions.

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:40:12 +01:00
Hirohito Higashi
5887cce1d7
patch 9.1.1117: there are a few minor style issues
Problem:  there are a few minor style issues
Solution: fix the issues (Hirohito Higashi)

closes: 

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:34:30 +01:00
Yegappan Lakshmanan
b5f463ce4f
patch 9.1.1116: Vim9: super not supported in lambda expressions
Problem:  Vim9: super not supported in lambda expressions
          (Aliaksei Budavei)
Solution: Support using the super keyword in a closure in an instance
          method (Yegappan Lakshmanan)

fixes: 
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:25:24 +01:00
Yegappan Lakshmanan
44831e4bea
runtime(doc): Update the 'specifies' keyword documentation, slightly reformat
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:23:07 +01:00
Christian Brabandt
c0f0e2380e
patch 9.1.1115: [security]: use-after-free in str_to_reg()
Problem:  [security]: use-after-free in str_to_reg()
          (fizz-is-on-the-way)
Solution: when redirecting the :display command, check that one
          does not output to the register being displayed

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-63p5-mwg2-787v

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:06:38 +01:00
Christian Brabandt
27822a0441
patch 9.1.1114: enabling termguicolors automatically confuses users
Problem:  enabling termguicolors automatically confuses users. Since
          querying the terminal for the RGB flag happens asynchronously,
          enabling termguicolors is noticeable by users as the highlighting changes
          and is therefore unexpected.
          (after v9.1.1054)
Solution: comment out that part for now. We may need another way to
          enable this in the future.

fixes: 
fixes: 
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 09:30:00 +01:00
Vladyslav Rehan
3f60114236
runtime(keymap): Add ukrainian-enhanced keymap
The "Ukrainian enhanced keymap" allows you to type Ukrainian in Vim
using jcuken Windows layout.

Original file is made by Ivan Korneliuk and can be found at
https://github.com/vansha/ukrainian-enhanced.vim. It is being added here
with the permission of the author.

There is another ukrainian layout already in Vim, namely the
keymap\ukrainian-jcuken.vim script by Anatoli Sakhnik. But this one
differs in way it maps numeric keys. It uses values usual for Windows
users.

closes: 

Signed-off-by: Vladyslav Rehan <rehanvladyslav@gmail.com>
Signed-off-by: Ivan Korneliuk <vansha@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-15 09:59:57 +01:00
Yee Cheng Chin
e67eff2e24
patch 9.1.1113: tests: Test_terminal_builtin_without_gui waits 2 seconds
Problem:  tests: Test_terminal_builtin_without_gui waits 2 seconds
Solution: add --not-a-term to remove the annoying 2s delay in error
          message when Vim detects that stdio are not from a terminal
          (Yee Cheng Chin)

closes: 

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 18:01:25 +01:00
zeertzjq
b6c900be9c
patch 9.1.1112: Inconsistencies in get_next_or_prev_match()
Problem:  Inconsistencies in get_next_or_prev_match() (after 9.1.1109).
Solution: Change "file" to "entry" or "match" in comments.  Use the same
          order of branches for PAGEUP and PAGEDOWN (zeertzjq).

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:59:31 +01:00
glepnir
faf4112cdc
runtime(doc): document ComplMatchIns highlight for insert-completion
closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:57:52 +01:00
Luca Saccarola
73d8222b31
runtime(netrw): upstream snapshot of v177
relevant commits:
- defaults!: use 'suffixes' for 'g:netrw_sort_sequence'
- refactor: remove associated buffer when deliting a file
- refactor: s:NetrwLocalRm
- refactor: s:NetrwDelete
- refactor: s:NetrwLocalRmFile
- feat: use vim.notify on neovim
- fix: prefer v:lua instead of luaeval for vim.deprecate
- chore: remove old batteries

closes: 

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:54:22 +01:00
Hirohito Higashi
bf7c88d852
patch 9.1.1111: Vim9: variable not found in transitive import
Problem:  Vim9: variable not found in transitive import
          (lifepillar)
Solution: fix import and class extends (Hirohito Higashi)

fixes: 
related: 
closes: 

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>
2025-02-13 21:04:07 +01:00
Yee Cheng Chin
e70587dbdb
patch 9.1.1110: Vim tests are slow and flaky
Problem:  Vim tests are slow and flaky at the same time due to reliance
          on timeouts which are unreliable.
Solution: improve Vim test performance and reduce flakiness
          (Yee Cheng Chin)

A lot of Vim tests currently rely on waiting a specific amount of time
before asserting a condition. This is bad because 1) it is slow, as the
timeout is hardcoded, 2) it's unreliable as a resource-starved runner
may overshoot the timeout. Also, there are a lot of builtin sleep
commands in commonly used utilities like VerifyScreenDump and WaitFor()
which leads to a lot of unnecessary idle time.

Fix these issues by doing the following:
1. Make utilities like VerifyScreenDump and WaitFor use the lowest wait
   time possible (1 ms). This essentially turns it into a spin wait. On
   fast machines, these will finish very quickly. For existing tests
   that had an implicit reliance on the old timeouts (e.g.
   VerifyScreenDump had a 50ms wait before), fix the tests to wait that
   specific amount explicitly.
2. Fix tests that sleep or wait for long amounts of time to instead
   explicitly use a callback mechanism to be notified when a child
   terminal job has finished. This allows the test to only take as much
   time as possible instead of having to hard code an unreliable
   timeout.

With these fixes, tests should 1) completely quickly on fast machines,
and 2) on slow machines they will still run to completion albeit slowly.
Note that previoulsy both were not true. The hardcoded timeouts meant
that on fast machines the tests were mostly idling wasting time, whereas
on slow machines, the timeouts often were not generous enough to allow
them to run to completion.

closes: 

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:55:45 +01:00
glepnir
977561a719
patch 9.1.1109: cmdexpand.c hard to read
Problem:  cmdexpand.c hard to read
Solution: refactor the file slightly (glepnir)

closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:48:56 +01:00
Matt Perry
d7deeffe11
runtime(exports): include simple filetype plugin
closes: 

Signed-off-by: Matt Perry <matt@mattperry.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:45:13 +01:00
Matt Perry
407319fe89
runtime(samba): include simple filetype plugin
closes: 

Signed-off-by: Matt Perry <matt@mattperry.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:42:43 +01:00
zeertzjq
2c47ab8fcd
patch 9.1.1108: 'smoothscroll' gets stuck with 'listchars' "eol"
Problem:  'smoothscroll' gets stuck with 'listchars' "eol".
Solution: Count size of 'listchars' "eol" in line size when scrolling.
          (zeertzjq)

related: neovim/neovim#32405
closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:34:34 +01:00
glepnir
c0b7ca406b
patch 9.1.1107: cannot loop through completion menu with fuzzy
Problem:  cannot loop through completion menu with fuzzy and nosort in
          'completeopt'
          (Tomasz N)
Solution: Reset cur to zero and update compl_shown_match when
          'completeopt' contains "nosort" but not "noselect"
          (glepnir)

fixes: 
closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:27:44 +01:00
Doug Kearns
4f010c90bd
runtime(vim): Update base-syntax, always match continuation comments to EOL
closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:24:42 +01:00
Wu, Zhenyu
8f3277fbbe
runtime(nroff): set define option & add matchit config in ftplugin
closes: 

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Aman Verma <amanraoverma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-12 20:58:57 +01:00
Doug Kearns
a9c06429ac
runtime(vim): Update base-syntax, match Vim9 boolean and null literals in parens
- Match Vim9 boolean and null literals in parenthesised expressions and
  function argument lists.
- Match read-only registers in expressions.

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-12 20:44:17 +01:00
Christian Brabandt
88ce0c546b
patch 9.1.1106: tests: Test_log_nonexistent() causes asan failure
Problem:  tests: Test_log_nonexistent() causes asan failure
          (Hirohito Higashi)
Solution: don't run vim using system(), but run Vim in a terminal

related: 
related: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 22:58:20 +01:00