]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
20 months agopatch 9.0.2146: text-property without type errors when joining 13553/head v9.0.2146
Christian Brabandt [Sun, 3 Dec 2023 16:56:43 +0000 (17:56 +0100)] 
patch 9.0.2146: text-property without type errors when joining

Problem:  text-property without type errors when joining
Solution: count all text-properties, with or without type
          before joining lines

Error when joining lines with text properties without a proper type

When joining lines, we need to consider all text properties that are
attached to a line, even when those text properties are invalid and do
not have a type attached to them.

However, since patch v9.0.0993
(commit: 89469d157aea01513bde826b4519dd6b5fbceae4)
those text properties won't be counted when joining lines and therefore
this will cause the adjustment for text properties on joining to go
wrong (and may later cause SIGABRT with an invalid free pointer)

I am not sure, why the condition to not count text properties with a
valid type was added in patch v9.0.993, because no test fails if those
condition is removed. So let's just remove this condition and add a test
that verifies, that we are able to join lines, even when the text
properties attached to it do not have a valid type.

fixes: #13609
closes: #13614

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2145: wrong scrolling in insert mode with smoothscroll v9.0.2145
zeertzjq [Sun, 3 Dec 2023 16:54:10 +0000 (17:54 +0100)] 
patch 9.0.2145: wrong scrolling in insert mode with smoothscroll

Problem:  Wrong scrolling in Insert mode with 'smoothscroll' at the
          bottom of the window.
Solution: Don't use set_topline() when 'smoothscroll' is set.

fixes: #13612
closes: #13613

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2144: Text properties causes wrong line wrapping v9.0.2144
zeertzjq [Sun, 3 Dec 2023 16:50:47 +0000 (17:50 +0100)] 
patch 9.0.2144: Text properties causes wrong line wrapping

Problem:  Text properties causes wrong line wrapping to be drawn.
Solution: Find the index of the last text property that inserts text.

closes: #13611

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoCI: disable the test_terminal_resize2() test for GH CI in gui mode (#13615)
Christian Brabandt [Sun, 3 Dec 2023 16:48:29 +0000 (16:48 +0000)] 
CI: disable the test_terminal_resize2() test for GH CI in gui mode (#13615)

becaues it tends to time-out CI for unknown reasons.

related: #13566

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2143: [security]: buffer-overflow in ex_substitute v9.0.2143
Christian Brabandt [Thu, 30 Nov 2023 10:32:18 +0000 (11:32 +0100)] 
patch 9.0.2143: [security]: buffer-overflow in ex_substitute

Problem:  [security]: buffer-overflow in ex_substitute
Solution: clear memory after allocating

When allocating the new_start pointer in ex_substitute() the memory
pointer points to some garbage that the following for loop in
ex_cmds.c:4743 confuses and causes it to accessing the new_start pointer
beyond it's size, leading to a buffer-overlow.

So fix this by using alloc_clear() instead of alloc(), which will
clear the memory by NUL and therefore cause the loop to terminate
correctly.

Reported by @henices, thanks!

closes: #13596
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2142: [security]: stack-buffer-overflow in option callback functions v9.0.2142
Christian Brabandt [Wed, 29 Nov 2023 10:34:05 +0000 (11:34 +0100)] 
patch 9.0.2142: [security]: stack-buffer-overflow in option callback functions

Problem:  [security]: stack-buffer-overflow in option callback functions
Solution: pass size of errbuf down the call stack, use snprintf()
          instead of sprintf()

We pass the error buffer down to the option callback functions, but in
some parts of the code, we simply use sprintf(buf) to write into the error
buffer, which can overflow.

So let's pass down the length of the error buffer and use sprintf(buf, size)
instead.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2141: [security]: buffer-overflow in suggest_trie_walk v9.0.2141
Christian Brabandt [Wed, 29 Nov 2023 09:23:39 +0000 (10:23 +0100)] 
patch 9.0.2141: [security]: buffer-overflow in suggest_trie_walk

Problem:  [security]: buffer-overflow in suggest_trie_walk
Solution: Check n before using it as index into byts array

Basically, n as an index into the byts array, can point to beyond the byts
array. So let's double check, that n is within the expected range after
incrementing it from sp->ts_curi and bail out if it would be invalid.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2140: [security]: use-after-free in win-enter v9.0.2140
Christian Brabandt [Tue, 28 Nov 2023 21:03:48 +0000 (22:03 +0100)] 
patch 9.0.2140: [security]: use-after-free in win-enter

Problem:  [security]: use-after-free in win-enter
Solution: validate window pointer before calling win_enter()

win_goto() may stop visual mode, if it is active. However, this may in
turn trigger the ModeChanged autocommand, which could potentially free
the wp pointer which was valid before now became stale and points to now
freed memory.

So before calling win_enter(), let's verify one more time, that the
wp pointer still points to a valid window structure.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoCI: check that all files are listed in Filelist (#13601)
Peter Simonyi [Fri, 1 Dec 2023 17:07:42 +0000 (12:07 -0500)] 
CI: check that all files are listed in Filelist (#13601)

Sometimes patches add files that should be included in tarballs for
distribution, but are not added to Filelist (used by Makefile to build
the tar archive).  This can break the build, or it can be silently
ignored as runtime files are simply not included in the distribution.

Add a CI check to ensure all files tracked in the repository are
assigned to a variable in Filelist.  A few files were not listed because
they do not need to be included in builds and tarballs, so add an IGNORE
variable for these exceptions.

Co-authored-by: Peter Simonyi <pts@petersimonyi.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2139: html.angular ft is problematic v9.0.2139
Christian Brabandt [Fri, 1 Dec 2023 17:01:17 +0000 (18:01 +0100)] 
patch 9.0.2139: html.angular ft is problematic

Problem:  html.angular ft is problematic
Solution: partly revert v9.0.2137

The html.angular filetype causes issues and does not trigger FileType
autocommands for the html or angular filetypes.

So let's roll back that particular change and detect this only as html
file

related: https://github.com/vim/vim/pull/13594#issuecomment-1834465890

closes: #13604

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoCI: disable the test_terminal_resize() test for GH CI in GUI (#13603)
Christian Brabandt [Fri, 1 Dec 2023 16:59:32 +0000 (16:59 +0000)] 
CI: disable the test_terminal_resize() test for GH CI in GUI (#13603)

fixes: #13566

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2138: Overflow logic requires long long v9.0.2138
Ernie Rael [Thu, 30 Nov 2023 17:20:00 +0000 (18:20 +0100)] 
patch 9.0.2138: Overflow logic requires long long

Problem:  Overflow logic requires long long
Solution: Define vimlong_T data type to make life easier
          for porters

closes: #13598

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(Filelist): include several missing files (#13600)
Peter Simonyi [Thu, 30 Nov 2023 16:46:55 +0000 (11:46 -0500)] 
runtime(Filelist): include several missing files (#13600)

These files were discovered to be missing from Filelist, and thus
distribution tarballs:
- editorconfig plugin
- extra files for Rust support
- readme for Haiku OS builds

Co-authored-by: Peter Simonyi <pts@petersimonyi.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2137: Can't detect angular & mustache filetypes v9.0.2137
ObserverOfTime [Thu, 30 Nov 2023 16:41:19 +0000 (17:41 +0100)] 
patch 9.0.2137: Can't detect angular & mustache filetypes

Problem:  Can't detect angular & mustache filetypes
Solution: Detect *.mustache as Mustache filetype;
          detect *.component.html as html.angular filetype

closes: #13594

Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(syntax-test): ci fails, disable html test for now
Christian Brabandt [Thu, 30 Nov 2023 16:33:32 +0000 (17:33 +0100)] 
runtime(syntax-test): ci fails, disable html test for now

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2136: MSVC errorformat can be improved v9.0.2136
Shawn Hatori [Tue, 28 Nov 2023 19:51:07 +0000 (20:51 +0100)] 
patch 9.0.2136: MSVC errorformat can be improved

Problem:  MSVC errorformat can be improved
Solution: parse error type and column number in MSVC errorformat

closes: #13587

Signed-off-by: Shawn Hatori <shawn.hatori@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2135: No test for mode() when executing Ex commands v9.0.2135
zeertzjq [Tue, 28 Nov 2023 19:46:29 +0000 (20:46 +0100)] 
patch 9.0.2135: No test for mode() when executing Ex commands

Problem:  No test for mode() when executing Ex commands
Solution: Add some test cases and simplify several other test cases.
          Also add a few more test cases for ModeChanged.

closes: #13588

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(lang): Revise Makefile (#13589)
K.Takata [Tue, 28 Nov 2023 19:44:28 +0000 (04:44 +0900)] 
runtime(lang): Revise Makefile (#13589)

* Revise runtime/lang/Makefile
* Use predefined variables (`$@`, `$<`) instead of the actual file names.
  (Adding new rules should become easier.)
* Adjust spacing.
* Regenerate converted menu files

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(html): Update syntax file (#13591)
dkearns [Tue, 28 Nov 2023 19:41:41 +0000 (06:41 +1100)] 
runtime(html): Update syntax file (#13591)

Add missing search element and update ARIA attribute list.

Add a very basic test file to check all elements are matched.

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2134: ml_get error when scrolling v9.0.2134
Christian Brabandt [Mon, 27 Nov 2023 22:25:03 +0000 (23:25 +0100)] 
patch 9.0.2134: ml_get error when scrolling

Problem:  ml_get error when scrolling after delete
Solution: mark topline to be validated in main_loop
          if it is larger than current buffers line
          count

reset_lnums() is called after e.g. TextChanged autocommands and it may
accidentally cause curwin->w_topline to become invalid, e.g. if the
autocommand has deleted some lines.

So verify that curwin->w_topline points to a valid line and if not, mark
the window to have w_topline recalculated in main_loop() in
update_topline() after reset_lnums() returns.

fixes: #13568
fixes: #13578

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2133: Cannot detect overstrike mode in Cmdline mode v9.0.2133
Sam-programs [Mon, 27 Nov 2023 21:22:51 +0000 (22:22 +0100)] 
patch 9.0.2133: Cannot detect overstrike mode in Cmdline mode

Problem:  Cannot detect overstrike mode in Cmdline mode
Solution: Make mode() return "cr" for overstrike

closes: #13569

Signed-off-by: Sam-programs <None>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2132: Duplicate Netbeans Error Message v9.0.2132
Christian Brabandt [Mon, 27 Nov 2023 19:04:24 +0000 (20:04 +0100)] 
patch 9.0.2132: Duplicate Netbeans Error Message

Problem:  Duplicate Netbeans Error Message
Solution: Remove duplicate message

We have 2 error Messages used for the Netbeans interface:

- EXTERN char e_invalid_buffer_identifier_in_close[]
  INIT(= N_("E648: Invalid buffer identifier in close"));
- EXTERN char e_invalid_buffer_identifier_in_close_2[]
  INIT(= N_("E649: Invalid buffer identifier in close"));

Since the error message is exactly the same, get rid of the  second
message.

closes: #13584

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2131: not all nushell files detected v9.0.2131
Daniel Buch Hansen [Mon, 27 Nov 2023 19:00:56 +0000 (20:00 +0100)] 
patch 9.0.2131: not all nushell files detected

Problem:  not all nushell files detected
Solution: use *.nu to detect nushell files

closes: #13586

Signed-off-by: Daniel Buch Hansen <boogiewasthere@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agotranslation(de): Updated German translations (#13585)
Christian Brabandt [Mon, 27 Nov 2023 18:59:15 +0000 (18:59 +0000)] 
translation(de): Updated German translations (#13585)

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(nginx): add additional nginx keywords (#13581)
Chris Aumann [Sun, 26 Nov 2023 14:06:27 +0000 (15:06 +0100)] 
runtime(nginx): add additional nginx keywords (#13581)

* Add support for missing keywords to the nginx syntax plugin

This adds support for several keywords from
- the built-in HTTP/2 module,
- the built-in SSL module,
- the built-in uWSGI module,
- the experimental QUIC branch,
- the third-party SSL CT module,
- the third-party dynamic TLS records patch.

Co-Author: ObserverOfTime <chronobserver@disroot.org>

* Add missing http2/ http3 keywords to nginx plugin

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(tutor): add Make_mvc.mak file for tutor (#13580)
Restorer [Sun, 26 Nov 2023 14:01:56 +0000 (14:01 +0000)] 
runtime(tutor): add Make_mvc.mak file for tutor (#13580)

* Added Make_mvc.mak file for tutor

* updated Filelist

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agotranslation(ru): updated Russian translations for tutorials (#13579)
Restorer [Sun, 26 Nov 2023 09:14:11 +0000 (09:14 +0000)] 
translation(ru): updated Russian translations for tutorials (#13579)

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agotranslation(it): updated Italian translation
Antonio Giovanni Colombo [Sun, 26 Nov 2023 09:11:40 +0000 (10:11 +0100)] 
translation(it): updated Italian translation

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2130: some errors with translation Makefiles v9.0.2130
Ken Takata [Sat, 25 Nov 2023 14:51:00 +0000 (15:51 +0100)] 
patch 9.0.2130: some errors with translation Makefiles

Problem:  some errors with translation Makefiles
Solution: fix issues

Update src/po/ makefiles after 9.0.2127

* Change how to check `%LANGUAGE%`.
  Check it only when needed.
* Add double quotes to where `GETTEXT_PATH` is used.
  Before 9.0.2127, this worked: `nmake -f Make_mvc.mak GETTEXT_PATH="\"C:\Program Files\Git\usr\bin\""` (which was a bit tricky.)
  9.0.2127 broke this and syntax error occurred.
  This doesn't work either in 9.0.2127: `nmake -f Make_mvc.mak GETTEXT_PATH="C:\Program Files\Git\usr\bin"`
  With this Commit, this works: `nmake -f Make_mvc.mak GETTEXT_PATH="C:\Program Files\Git\usr\bin"`
* Better error report for the `check` target.
  Show the line number of the error. (Imported from vim-jp/lang-ja.)

closes: #13567

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2129: [security]: use-after-free in call_dfunc() v9.0.2129
mityu [Sat, 25 Nov 2023 14:41:20 +0000 (15:41 +0100)] 
patch 9.0.2129: [security]: use-after-free in call_dfunc()

Problem:  [security]: use-after-free in call_dfunc()
Solution: Refresh dfunc pointer

closes: #13571

This Commit fixes a SEGV caused by a use-after-free bug in call_dfunc().
When calling check_ufunc_arg_types() from the call_dfunc() it may cause
def functions to be re-compiled and if there are too many def functions,
the def_functions array will be re-allocated.  Which means, that the
dfunc pointer in call_dfunc() now starts pointing to freed memory.

So we need to reset the dfunc pointer after calling
check_ufunc_arg_types().

Let's also add a test, to ensure we do not regress.

Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(doc): Update doc Makefiles with comments from #13567 (#13577)
Restorer [Sat, 25 Nov 2023 14:39:51 +0000 (14:39 +0000)] 
runtime(doc): Update doc Makefiles with comments from #13567 (#13577)

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(tsx): add indentation plugin (fixes #13574) (#13576)
Jōshin [Sat, 25 Nov 2023 14:38:09 +0000 (09:38 -0500)] 
runtime(tsx): add indentation plugin (fixes #13574) (#13576)

for now, let's just use the typescript indent file.

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2128: runtime(swig): add syntax and filetype plugins v9.0.2128
Julien Marrec [Sat, 25 Nov 2023 14:30:46 +0000 (15:30 +0100)] 
patch 9.0.2128: runtime(swig): add syntax and filetype plugins

Add syntax and filetype plugins for SWIG (Simplified Wrapper Interface
Generator) description files.

The default syntax for .i files highlights comments in a reverse
color scheme which doesn't look well.  This syntax builds
on vim's c++ syntax by adding highlighting for common swig
directives and user defined directives.  For an alternative
syntax, see vimscript #1247 (which I found after writing this).

closes: #13562

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
Co-authored-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2127: translation Makefiles can be improved v9.0.2127
RestorerZ [Thu, 23 Nov 2023 19:58:32 +0000 (20:58 +0100)] 
patch 9.0.2127: translation Makefiles can be improved

Problem:  translation Makefiles can be improved
Solution: Modified and extended po-related Makefiles and
          related files

closes: #13518

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2126: unused assignments when checking 'listchars' v9.0.2126
zeertzjq [Thu, 23 Nov 2023 19:47:16 +0000 (20:47 +0100)] 
patch 9.0.2126: unused assignments when checking 'listchars'

Problem:  Unused assignments when checking the value of 'listchars'.
Solution: Loop only once when just checking the value.  Add a test to
          check that this change doesn't cause double-free.

closes: #13559

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2125: File info disappears when 'cmdheight' has decreased v9.0.2125
zeertzjq [Thu, 23 Nov 2023 19:37:01 +0000 (20:37 +0100)] 
patch 9.0.2125: File info disappears when 'cmdheight' has decreased

Problem:  File info disappears immediately when 'cmdheight' has just
          decreased due to switching tabpage and 'shortmess' doesn't
          contain 'o' or 'O'.
Solution: Make sure msg_row isn't smaller than cmdline_row.

fixes: #13560
closes: #13561

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2124: INT overflow detection logic can be simplified v9.0.2124
Ernie Rael [Thu, 23 Nov 2023 19:21:45 +0000 (20:21 +0100)] 
patch 9.0.2124: INT overflow detection logic can be simplified

Problem:  INT overflow logic can be simplified
Solution: introduce trim_to_int() function

closes: #13556

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2123: Problem with initializing the length of range() lists v9.0.2123
Christian Brabandt [Thu, 23 Nov 2023 19:14:28 +0000 (20:14 +0100)] 
patch 9.0.2123: Problem with initializing the length of range() lists

Problem:  Problem with initializing the length of range() lists
Solution: Set length explicitly when it shouldn't contain any items

range() may cause a wrong calculation of list length, which may later
then cause a segfault in list_find().  This is usually not a problem,
because range_list_materialize() calculates the length, when it
materializes the list.

In addition, in list_find() when the length of the range was wrongly
initialized, it may seem to be valid, so the check for list index
out-of-bounds will not be true, because it is called before the list is
actually materialized. And so we may eventually try to access a null
pointer, causing a segfault.

So this patch does 3 things:

- In f_range(), when we know that the list should be empty, explicitly
  set the list->lv_len value to zero. This should happen, when
  start is larger than end (in case the stride is positive) or
  end is larger than start when the stride is negative.
  This should fix the underlying issue properly. However,

- as a safety measure, let's check that the requested index is not
  out of range one more time, after the list has been materialized
  and return NULL in case it suddenly is.

- add a few more tests to verify the behaviour.

fixes: #13557
closes: #13563

Co-authored-by: Tim Pope <tpope@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2122: [security]: prevent overflow in indenting v9.0.2122
Christian Brabandt [Wed, 22 Nov 2023 21:18:35 +0000 (22:18 +0100)] 
patch 9.0.2122: [security]: prevent overflow in indenting

Problem:  [security]: prevent overflow in indenting
Solution: use long long and remove cast to (int)

The shiftwidth option values are defined as being long. However, when
calculating the actual amount of indent, we cast down to (int), which
may cause the shiftwidth value to become negative and later it may even
cause Vim to try to allocate a huge amount of memory.

We already use long and long long variable types to calculate the indent
(and detect possible overflows), so the cast to (int) seems superfluous
and can be safely removed. So let's just remove the (int) cast and
calculate the indent using longs.

Additionally, the 'shiftwidth' option value is also used when determining
the actual 'cino' options. There it can again cause another overflow, so
make sure it is safe in parse_cino() as well.

fixes: #13554
closes: #13555

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2121: [security]: use-after-free in ex_substitute v9.0.2121
Christian Brabandt [Wed, 22 Nov 2023 20:26:41 +0000 (21:26 +0100)] 
patch 9.0.2121: [security]: use-after-free in ex_substitute

Problem:  [security]: use-after-free in ex_substitute
Solution: always allocate memory

closes: #13552

A recursive :substitute command could cause a heap-use-after free in Vim
(CVE-2023-48706).

The whole reproducible test is a bit tricky, I can only reproduce this
reliably when no previous substitution command has been used yet
(which is the reason, the test needs to run as first one in the
test_substitute.vim file) and as a combination of the `:~` command
together with a :s command that contains the special substitution atom `~\=`
which will make use of a sub-replace special atom and calls a vim script
function.

There was a comment in the existing :s code, that already makes the
`sub` variable allocate memory so that a recursive :s call won't be able
to cause any issues here, so this was known as a potential problem
already.  But for the current test-case that one does not work, because
the substitution does not start with `\=` but with `~\=` (and since
there does not yet exist a previous substitution atom, Vim will simply
increment the `sub` pointer (which then was not allocated dynamically)
and later one happily use a sub-replace special expression (which could
then free the `sub` var).

The following commit fixes this, by making the sub var always using
allocated memory, which also means we need to free the pointer whenever
we leave the function. Since sub is now always an allocated variable,
we also do no longer need the sub_copy variable anymore, since this one
was used to indicated when sub pointed to allocated memory (and had
therefore to be freed on exit) and when not.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(netrw): Fix handling of very long filename on longlist style (#12150)
K.Takata [Wed, 22 Nov 2023 09:20:01 +0000 (18:20 +0900)] 
runtime(netrw): Fix handling of very long filename on longlist style (#12150)

If there is a file with a very long filename (longer than
g:netrw_maxfilenamelen), and if g:netrw_liststyle is set to 1, no space
is inserted between the filename and the filesize and the file cannot be
opened because of this.

E.g.:
```
$ echo hello > 12345678901234567890123456789012   # 32 bytes: OK
$ echo hello > 123456789012345678901234567890123  # 33 bytes: not OK
$ echo hello > 1234567890123456789012345678901234 # 34 bytes: not OK
$ echo hello > こんにちは                         # multibyte filename
$ LC_ALL=C.UTF-8 vim . --clean --cmd "set loadplugins" --cmd "let g:netrw_liststyle=1"
```

Then, it will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                              0 Mon Mar 13 19:25:16 2023
./                               0 Mon Mar 13 19:44:58 2023
12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023
12345678901234567890123456789012346 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901236 Mon Mar 13 19:29:49 2023
こんにちは                  6 Mon Mar 13 19:30:41 2023
```

If the length of the filename is 32 bytes, there is a space between the
filename and the filesize. However, when it is longer than 32 bytes, no
space is shown.

Also, you may find that the filesize of the multibyte named file is not
aligned.

After this patch is applied, the filelist will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                                             0 Mon Mar 13 20:49:22 2023
./                                              0 Mon Mar 13 21:12:14 2023
1234567890123456789012345678901             10000 Mon Mar 13 20:57:55 2023
12345678901234567890123456789012                6 Mon Mar 13 19:29:43 2023
123456789012345678901234567890123               6 Mon Mar 13 19:29:49 2023
1234567890123456789012345678901234              6 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901234567       10000 Mon Mar 13 21:03:23 2023
1234567890123456789012345678901234567890    10000 Mon Mar 13 21:03:36 2023
123456789012345678901234567890123456789012  10000 Mon Mar 13 21:03:59 2023
1234567890123456789012345678901234567890123  10000 Mon Mar 13 21:03:45 2023
1234567890123456789012345678901234567890123456  5 Mon Mar 13 21:08:15 2023
12345678901234567890123456789012345678901234567  10 Mon Mar 13 21:05:21 2023
こんにちは                                      6 Mon Mar 13 19:30:41 2023
```

Now we have 32 + 2 + 15 = 49 characters for filename and filesize.
It tries to align the filesize as much as possible.
The last line that has multibyte filename is also aligned.

Also fixed the issue that the file list is not shown correctly when
g:netrw_sort_by is set to 'size' and g:netrw_sizestyle is set to 'h' or
'H'.

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2120: un-used assignment in do_source_buffer_init v9.0.2120
Christian Brabandt [Sun, 19 Nov 2023 18:06:16 +0000 (19:06 +0100)] 
patch 9.0.2120: un-used assignment in do_source_buffer_init

Problem:  un-used assignment in do_source_buffer_init
Solution: Remove it

Coverity warns about assigning NULL to line in scriptfile.c:1408,
because right after that assignment, in the next iteration of the loop,
line will be overwritten by the next value from vim_strsave().

And in case this was the last iteration, the line variable is no longer
used until the function returns. So we can safely remove that assignment.

closes: #13547

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2119: remove dead-condition in ex_class v9.0.2119
Christian Brabandt [Sun, 19 Nov 2023 17:59:52 +0000 (18:59 +0100)] 
patch 9.0.2119: remove dead-condition in ex_class

Problem:  remove dead-condition in ex_class()
Solution: remove the extra condition

The variable is_class must be true once we reach the

,----
| else if (has_static)
`----

in line 1750, because we break out earlier if is_class is false in line
1598 of vim9class.c. And once 'has_static = TRUE', we must be in a
class and there fore is_class is true.

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2118: [security]: avoid double-free in get_style_font_variants v9.0.2118
Christian Brabandt [Sun, 19 Nov 2023 15:25:45 +0000 (16:25 +0100)] 
patch 9.0.2118: [security]: avoid double-free in get_style_font_variants

Problem:  [security]: avoid double-free
Solution: Only fee plain_font, when it is not the same as bold_font

When plain_font == bold_font and bold_font is not NULL, we may end up
trying to free bold_font again, which already has been freed a few lines
above.

So only free bold_font, when the condition gui.font_can_bold is true,
which means that bold_font is not pointing to plain_font (so it needs to
be freed separately).

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2117: [security] use-after-free in qf_free_items v9.0.2117
Christian Brabandt [Sun, 19 Nov 2023 15:19:27 +0000 (16:19 +0100)] 
patch 9.0.2117: [security] use-after-free in qf_free_items

Problem:  [security] use-after-free in qf_free_items
Solution: only access qfpnext, if it hasn't been freed

Coverity discovered a possible use-after-free in qf_free_items. When
freeing the qfline items, we may access freed memory, when qfp ==
qfpnext.

So only access qfpnext, when it hasn't been freed.

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(netrw): expand $COMSPEC without applying 'wildignore' (#13542)
Christian Brabandt [Tue, 21 Nov 2023 18:48:16 +0000 (18:48 +0000)] 
runtime(netrw): expand $COMSPEC without applying 'wildignore' (#13542)

When expanding $COMSPEC and a user has set :set wildignore=*.exe
netrw won't be able to properly cmd.exe, because it does not ignore the
wildignore setting.

So let's explicitly use expand() without applying the 'wildignore' and
'suffixes' settings to the result

closes: #13426

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(vim): Improve keymap file highlighting (#13550)
dkearns [Tue, 21 Nov 2023 18:43:40 +0000 (05:43 +1100)] 
runtime(vim): Improve keymap file highlighting (#13550)

- Match :loadkeymap to EOF as a region and contain only allowed items.
- Add highlighting for <Char- notation.
- add basic syntax highlighting tests

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(Filelist): include new doc-Makefiles (#13551)
zdohnal [Tue, 21 Nov 2023 18:42:56 +0000 (19:42 +0100)] 
runtime(Filelist): include new doc-Makefiles (#13551)

Tags for help files disappeared with the latest Vim update in Fedora,
which is caused by silent error (it didn't stop the build) about missing
file. I use 'make unixall' in Fedora to get the latest patchlevels and
the new files were missing from Filelist file which is used for
generating the tarball.

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(doc): Fix whitespace and formatting of some help files (#13549)
h_east [Tue, 21 Nov 2023 12:24:23 +0000 (21:24 +0900)] 
runtime(doc): Fix whitespace and formatting of some help files (#13549)

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(doc): minor typo fixes (#13548)
njohnston [Sun, 19 Nov 2023 23:18:57 +0000 (23:18 +0000)] 
runtime(doc): minor typo fixes (#13548)

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2116: No test for defining sign without attribute v9.0.2116
Luuk van Baal [Sun, 19 Nov 2023 09:55:35 +0000 (10:55 +0100)] 
patch 9.0.2116: No test for defining sign without attribute

Problem:  No test for defining sign without attribute
Solution: Add test for defining sign without attributes

closes: #13544

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2115: crash when callback function aborts because of recursiveness v9.0.2115
Christian Brabandt [Sun, 19 Nov 2023 09:52:50 +0000 (10:52 +0100)] 
patch 9.0.2115: crash when callback function aborts because of recursiveness

Problem:  crash when callback function aborts because of recursiveness
Solution: correctly initialize rettv

Initialize rettv in invoke_popup_callback()

Since v9.0.2030, call_callback may exit early when the callback recurses
too much.  This meant that call_func, which would set rettv->v_type =
VAR_UNKNOWN, was not being called.

Without rettv->v_type being explicitly set, it still contained whatever
garbage was used to initialize the stack value in invoke_popup_callback.
This would lead to possible crashes when calling clear_tv(&rettv).

Rather than rely on action at a distance, explicitly initialize rettv's
type to VAR_UNKNOWN so clear_tv can tell nothing needs to be done.

closes: #13495
closes: #13545
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2114: overflow detection not accurate when adding digits v9.0.2114
Christian Brabandt [Sun, 19 Nov 2023 09:47:21 +0000 (10:47 +0100)] 
patch 9.0.2114: overflow detection not accurate when adding digits

Problem:  overflow detection not accurate when adding digits
Solution: Use a helper function

Use a helper function to better detect overflows before adding integer
digits to a long or an integer variable respectively. Signal the
overflow to the caller function.

closes: #13539

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
20 months agopatch 9.0.2113: Coverity warns for another overflow in shift_line() v9.0.2113
Christian Brabandt [Sun, 19 Nov 2023 09:45:24 +0000 (10:45 +0100)] 
patch 9.0.2113: Coverity warns for another overflow in shift_line()

Problem:  Coverity warns for another overflow in shift_line()
Solution: Test for INT_MAX after the if condition, cast integer values
          to (long long) before multiplying.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
20 months agoruntime(doc): Refactor doc-Makefiles (#13519)
Restorer [Sat, 18 Nov 2023 16:12:20 +0000 (16:12 +0000)] 
runtime(doc): Refactor doc-Makefiles (#13519)

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(doc): document proper notation of gVim, document vim-security list
Christian Brabandt [Sat, 18 Nov 2023 09:10:07 +0000 (10:10 +0100)] 
runtime(doc): document proper notation of gVim, document vim-security list

Also, while at it, document the vim-security mailing list.

closes: #13429

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agotranslation(sr): Update Serbian messages translation (#13538)
Ivan Pešić [Fri, 17 Nov 2023 11:54:10 +0000 (15:54 +0400)] 
translation(sr): Update Serbian messages translation (#13538)

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2112: [security]: overflow in shift_line v9.0.2112
Christian Brabandt [Tue, 14 Nov 2023 21:42:59 +0000 (22:42 +0100)] 
patch 9.0.2112: [security]: overflow in shift_line

Problem:  [security]: overflow in shift_line
Solution: allow a max indent of INT_MAX

[security]: overflow in shift_line

When shifting lines in operator pending mode and using a very large
value, we may overflow the size of integer. Fix this by using a long
variable, testing if the result would be larger than INT_MAX and if so,
indent by INT_MAX value.

Special case: We cannot use long here, since on 32bit architectures (or
on Windows?), it typically cannot take larger values than a plain int,
so we have to use long long count, decide whether the resulting
multiplication of the shiftwidth value * amount is larger than INT_MAX
and if so, we will store INT_MAX as possible larges value in the long
long count variable.

Then we can safely cast it back to int when calling the functions to set
the indent (set_indent() or change_indent()). So this should be safe.

Add a test that when using a huge value in operator pending mode for
shifting, we will shift by INT_MAX

closes: #13535

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2111: [security]: overflow in get_number v9.0.2111
Christian Brabandt [Tue, 14 Nov 2023 20:58:26 +0000 (21:58 +0100)] 
patch 9.0.2111: [security]: overflow in get_number

Problem:  [security]: overflow in get_number
Solution: Return 0 when the count gets too large

[security]: overflow in get_number

When using the z= command, we may overflow the count with values larger
than MAX_INT. So verify that we do not overflow and in case when an
overflow is detected, simply return 0

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2110: [security]: overflow in ex address parsing v9.0.2110
Christian Brabandt [Tue, 14 Nov 2023 20:33:29 +0000 (21:33 +0100)] 
patch 9.0.2110: [security]: overflow in ex address parsing

Problem:  [security]: overflow in ex address parsing
Solution: Verify that lnum is positive, before substracting from
          LONG_MAX

[security]: overflow in ex address parsing

When parsing relative ex addresses one may unintentionally cause an
overflow (because LONG_MAX - lnum will overflow for negative addresses).

So verify that lnum is actually positive before doing the overflow
check.

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2109: [security]: overflow in nv_z_get_count v9.0.2109
Christian Brabandt [Tue, 14 Nov 2023 20:02:30 +0000 (21:02 +0100)] 
patch 9.0.2109: [security]: overflow in nv_z_get_count

Problem:  [security]: overflow in nv_z_get_count
Solution: break out, if count is too large

When getting the count for a normal z command, it may overflow for large
counts given. So verify, that we can safely store the result in a long.

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2108: [security]: overflow with count for :s command v9.0.2108
Christian Brabandt [Tue, 14 Nov 2023 19:45:48 +0000 (20:45 +0100)] 
patch 9.0.2108: [security]: overflow with count for :s command

Problem:  [security]: overflow with count for :s command
Solution: Abort the :s command if the count is too large

If the count after the :s command is larger than what fits into a
(signed) long variable, abort with e_value_too_large.

Adds a test with INT_MAX as count and verify it correctly fails.

It seems the return value on Windows using mingw compiler wraps around,
so the initial test using :s/./b/9999999999999999999999999990 doesn't
fail there, since the count is wrapping around several times and finally
is no longer larger than 2147483647. So let's just use 2147483647 in the
test, which hopefully will always cause a failure

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2107: [security]: FPE in adjust_plines_for_skipcol v9.0.2107
Christian Brabandt [Tue, 14 Nov 2023 19:05:59 +0000 (20:05 +0100)] 
patch 9.0.2107: [security]: FPE in adjust_plines_for_skipcol

Problem:  [security]: FPE in adjust_plines_for_skipcol
Solution: don't divide by zero, return zero

Prevent a floating point exception when calculating w_skipcol (which can
happen with a small window when the number option is set and cpo+=n).

Add a test to verify

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2106: [security]: Use-after-free in win_close() v9.0.2106
Christian Brabandt [Tue, 14 Nov 2023 18:31:34 +0000 (19:31 +0100)] 
patch 9.0.2106: [security]: Use-after-free in win_close()

Problem:  [security]: Use-after-free in win_close()
Solution: Check window is valid, before accessing it

If the current window structure is no longer valid (because a previous
autocommand has already freed this window), fail and return before
attempting to set win->w_closing variable.

Add a test to trigger ASAN in CI

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(tar): comment out strange error condition check
Christian Brabandt [Tue, 14 Nov 2023 16:15:17 +0000 (17:15 +0100)] 
runtime(tar): comment out strange error condition check

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2105: skipcol not reset when topline changed v9.0.2105
Luuk van Baal [Tue, 14 Nov 2023 16:05:18 +0000 (17:05 +0100)] 
patch 9.0.2105: skipcol not reset when topline changed

Problem:  Skipcol is not reset when topline changed scrolling cursor to top
Solution: reset skipcol

closes: #13528
closes: #13532

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2104: wast filetype should be replaced by wat filetype v9.0.2104
rhysd [Tue, 14 Nov 2023 15:46:07 +0000 (16:46 +0100)] 
patch 9.0.2104: wast filetype should be replaced by wat filetype

Problem:  wast filetype should be replaced by wat filetype
Solution: start using the official wat filetype name

runtime: rename `wast` filetype to `wat` (Wasm text format)

The problem is the name of the current filetype wast. When the plugin
was initially created, the file extension for Wasm text format was not
fixed and .wast was more popular.

However, recently .wat became the official file extension for
WebAssembly text (WAT) format and .wast is now a file extension for the
unofficial WAST format, which is a superset of .wat for the convenience
to describe the Wasm specification conformance tests.

https://webassembly.js.org/docs/contrib-wat-vs-wast.html

However for now, let's keep using the `wat` filetype even for the .wast
extension, so that we at least do not lose the filetype settings and
syntax highlighting. This can be adjusted later, if it turns out to have
a separate need for.

closes: #13533

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(doc): fix typo in pi_gzip.txt
Christian Brabandt [Tue, 14 Nov 2023 15:44:37 +0000 (16:44 +0100)] 
runtime(doc): fix typo in pi_gzip.txt

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2103: recursive callback may cause issues on some archs v9.0.2103
Christian Brabandt [Sun, 12 Nov 2023 15:59:29 +0000 (16:59 +0100)] 
patch 9.0.2103: recursive callback may cause issues on some archs

Problem:  recursive callback may cause issues on some archs
Solution: Decrease the limit drastically to 20

Recursive callback limit causes problems on some architectures

Since commit 47510f3d6598a1218958c03ed11337a43b73f48d we have a test
that causes a recursive popup callback function to be executed. However
it seems the current limit of 'maxfuncdepth' option value is still too
recursive for some 32bit architectures (e.g. 32bit ARM).

So instead of allowing a default limit of 100 (default value for
'maxfuncdepth'), let's reduce this limit to 20. I don't think there is a
use case where one would need such a high recursive callback limit and a
limit of 20 seems reasonable (although it is currently hard-coded).

closes: #13495
closes: #13502

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2102: matchparen highlight not cleared in completion mode v9.0.2102
Christian Brabandt [Sun, 12 Nov 2023 15:55:01 +0000 (16:55 +0100)] 
patch 9.0.2102: matchparen highlight not cleared in completion mode

Problem:  matchparen highlight not cleared in completion mode
Solution: Clear matchparen highlighting in completion mode

Remove hard-coded hack in insexpand.c to clear the :3match before
displaying the completion menu.

Add a test for matchparen highlighting. While at it, move all test tests
related to the matchparen plugin into a separate test file.

closes: #13493
closes: #13524

Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoruntime(termdebug): improve the breakpoint sign label (#13525)
Shane-XB-Qian [Sun, 12 Nov 2023 15:53:39 +0000 (23:53 +0800)] 
runtime(termdebug): improve the breakpoint sign label (#13525)

// related #12589
// that should be the last chat (I) with Bram, r.i.p

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agoImprove CONTRIBUTING.md
shane.xb.qian [Sun, 12 Nov 2023 15:45:15 +0000 (16:45 +0100)] 
Improve CONTRIBUTING.md

closes: #13521

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
20 months agopatch 9.0.2101: CI: test_termdebug may still fail v9.0.2101
shane.xb.qian [Sun, 12 Nov 2023 08:42:12 +0000 (09:42 +0100)] 
patch 9.0.2101: CI: test_termdebug may still fail

Problem:  CI: test_termdebug may still fail
Solution: use term_wait() to make it more robust

closes: #13529

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)
Restorer [Sat, 11 Nov 2023 18:26:00 +0000 (18:26 +0000)] 
runtime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)

* Rename makefile_all.mak and makefile_mvc.mak

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(lynx): Update for Lynx 2.8.9 (#13510)
dkearns [Sat, 11 Nov 2023 18:06:56 +0000 (05:06 +1100)] 
runtime(lynx): Update for Lynx 2.8.9 (#13510)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(vim): Improve :let-heredoc syntax highlighting (#12923)
dkearns [Sat, 11 Nov 2023 18:06:01 +0000 (05:06 +1100)] 
runtime(vim): Improve :let-heredoc syntax highlighting (#12923)

"trim" and "eval" are allowed in any order and whitespace is not
required after "=<<".

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2100: CI: test_termdebug fails v9.0.2100
Christian Brabandt [Sat, 11 Nov 2023 17:59:33 +0000 (18:59 +0100)] 
patch 9.0.2100: CI: test_termdebug fails

Problem:  CI: test_termdebug fails
Solution: only test for a changed winlayout, if the window
          width actually changed

Also, include an unrelated comment (which doesn't warrant its own patch
number)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): clarify when formatoptions applies
Christian Brabandt [Sat, 11 Nov 2023 14:50:13 +0000 (15:50 +0100)] 
runtime(doc): clarify when formatoptions applies

closes: #13503

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(i3config): Update for i3 4.23 (#13522)
Ivan Grimaldi [Sat, 11 Nov 2023 12:09:26 +0000 (13:09 +0100)] 
runtime(i3config): Update for i3 4.23 (#13522)

Co-authored-by: Ivan Grimaldi <grimaldi.ivam@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2099: win32: terminal codes clear the terminal v9.0.2099
Nir Lichtman [Sat, 11 Nov 2023 10:27:41 +0000 (11:27 +0100)] 
patch 9.0.2099: win32: terminal codes clear the terminal

Problem:  Terminal control codes¹ are sent even when silent
          mode is on, causing the terminal to clear up
Solution: Block any terminal codes when silent mode is on

¹https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences

fixes: #12822
closes: #13521

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): Update usr_51.txt to be more inclusive (#13496)
ccn [Sat, 11 Nov 2023 08:35:50 +0000 (03:35 -0500)] 
runtime(doc): Update usr_51.txt to be more inclusive (#13496)

use their instead of his as the user may not be male

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): Add missing null_<type> help tags (#13498)
dkearns [Sat, 11 Nov 2023 08:33:43 +0000 (19:33 +1100)] 
runtime(doc): Add missing null_<type> help tags (#13498)

Problem:  Not all null_<type> values have a help tag
Solution: Add missing help tags

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoCI: labeler.yml use all instead of any for doc detection (#13507)
Philip H [Sat, 11 Nov 2023 08:14:48 +0000 (09:14 +0100)] 
CI: labeler.yml use all instead of any for doc detection (#13507)

fixup: https://github.com/vim/vim/pull/13506#pullrequestreview-1722013761

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2098: No filetype support for xcompose files v9.0.2098
ObserverOfTime [Sat, 11 Nov 2023 08:12:27 +0000 (09:12 +0100)] 
patch 9.0.2098: No filetype support for xcompose files

Problem:  No filetype support for xcompose files
Solution: Add filetype detection

closes: #13508

Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): clarify `:help inclusion` section
Ernie Rael [Sat, 11 Nov 2023 08:09:47 +0000 (09:09 +0100)] 
runtime(doc): clarify `:help inclusion` section

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoCI: labeler.yml: Add some more component detection rules (#13511)
K.Takata [Sat, 11 Nov 2023 08:04:31 +0000 (17:04 +0900)] 
CI: labeler.yml: Add some more component detection rules (#13511)

Add rules for `installer`, `platform-mac`, `platform-windows`, `xxd`.

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2097: No support for cypher files v9.0.2097
Gerrit Meier [Sat, 11 Nov 2023 07:58:26 +0000 (08:58 +0100)] 
patch 9.0.2097: No support for cypher files

Problem:  No support for cypher files
Solution: Add cypher filetype detection

Cypher query language support to work with (mostly) graph databases.

Already existing lsp support in Neovim's nvim-lspconfig:
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cypher_ls

closes: #13516

Signed-off-by: Gerrit Meier <meistermeier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2096: Vim9: confusing usage of private v9.0.2096
Ernie Rael [Sat, 11 Nov 2023 07:53:32 +0000 (08:53 +0100)] 
patch 9.0.2096: Vim9: confusing usage of private

Problem:  Vim9: confusing usage of private
Solution: clarify and use protected keyword instead

[vim9class] document `_` as protected instead of private

fixes #13504
closes: #13520

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoCI: labeler.yml: add documentation label (#13506)
Philip H [Thu, 9 Nov 2023 08:51:03 +0000 (09:51 +0100)] 
CI: labeler.yml: add documentation label (#13506)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): fix grammar in termdebug doc, remove trailing spaces (#13505)
zeertzjq [Thu, 9 Nov 2023 07:21:58 +0000 (15:21 +0800)] 
runtime(doc): fix grammar in termdebug doc, remove trailing spaces (#13505)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(termdebug): improve window handling, shorten var types
shane.xb.qian [Wed, 8 Nov 2023 20:59:15 +0000 (21:59 +0100)] 
runtime(termdebug): improve window handling, shorten var types

closes #13474

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(termdebug): handle buffer-local mappings properly
shane.xb.qian [Wed, 8 Nov 2023 20:44:48 +0000 (21:44 +0100)] 
runtime(termdebug):  handle buffer-local mappings properly

closes: #13475

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2095: statusline may look different than expected v9.0.2095
Christian Brabandt [Wed, 8 Nov 2023 20:23:29 +0000 (21:23 +0100)] 
patch 9.0.2095: statusline may look different than expected

Problem:  statusline may look different than expected
Solution: do not check for highlighting of stl and stlnc characters

statusline fillchar may be different than expected

If the highlighting group for the statusline for the current window
|hl-StatusLine| or the non-current window |hl-StatusLineNC| are cleared
(or do not differ from each other), than Vim will use the hard-coded
fallback values '^' (for the non-current windows) or '=' (for the
current window).  I believe this was done, to make sure the statusline
will always be visible and be distinguishable from the rest of the
window.

However, this may be unexpected, if a user explicitly defined those
fillchar characters just to notice that those values are then not used
by Vim.

So, let's assume users know what they are doing and just always return
the configured stl and stlnc values.  And if they want the statusline to
be non-distinguishable from the rest of the window space, so be it.  It
is their responsibility and Vim shall not know better what to use.

fixes: #13366
closes: #13488

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2094: Vim9: need more assignment tests v9.0.2094
Yegappan Lakshmanan [Wed, 8 Nov 2023 20:02:48 +0000 (21:02 +0100)] 
patch 9.0.2094: Vim9: need more assignment tests

Problem:  Vim9: need more assignment tests
Solution: Add test for using different types in assignment, function
          arguments and return values

closes: #13491

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(wget): Update for Wget2 2.1.0 (#13497)
dkearns [Wed, 8 Nov 2023 19:53:20 +0000 (06:53 +1100)] 
runtime(wget): Update for Wget2 2.1.0 (#13497)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2093: Unsupported option causes skipping of modeline test v9.0.2093
zeertzjq [Wed, 8 Nov 2023 19:48:05 +0000 (20:48 +0100)] 
patch 9.0.2093: Unsupported option causes skipping of modeline test

Problem:  Unsupported option causes rest of modeline test to be skipped.
Solution: Revert the change from patch 8.2.1432.

closes: #13499
closes: #13500

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2092: tests: failure in test_arabic v9.0.2092
Christian Brabandt [Sun, 5 Nov 2023 18:17:10 +0000 (19:17 +0100)] 
patch 9.0.2092: tests: failure in test_arabic

Problem:  tests: failure in test_arabic
Solution: adjust the test for the changed arabic keymap

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(keymap): Switch Hindu-Arabic to Arabic numerals in arabic keymap (#13430)
avidseeker [Sun, 5 Nov 2023 16:59:20 +0000 (16:59 +0000)] 
runtime(keymap): Switch Hindu-Arabic to Arabic numerals in arabic keymap (#13430)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agotranslation(ru): Update the translation of Russian messages to Vim 9.0.2091 (#13490)
Restorer [Sun, 5 Nov 2023 16:56:14 +0000 (16:56 +0000)] 
translation(ru): Update the translation of Russian messages to Vim 9.0.2091 (#13490)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(tar): improve the error detection
Christian Brabandt [Sun, 5 Nov 2023 16:44:05 +0000 (17:44 +0100)] 
runtime(tar): improve the error detection

Do not rely on the fact, that the last line matches warning, error,
inappropriate or unrecognized to determine if an error occurred. It
could also be a file, contains such a keyword.

So make the error detection slightly more strict and only assume an
error occured, if in addition to those 4 keywords, also a space matches
(this assumes the error message contains a space), which luckily on Unix
not many files match by default.

The whole if condition seems however slightly dubious.  In case an error
happened, this would probably already be caught in the previous if
statement, since this checks for the return code of the tar program.

There may however be tar implementations, that do not set the exit code
for some kind of error (but print an error message)? But let's keep this
check for now, not many people have noticed this behaviour until now, so
it seems to work reasonably well anyhow.

related: #6425
fixes: #13489
Signed-off-by: Christian Brabandt <cb@256bit.org>