]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
23 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years agoruntime(doc): document vim-script library function
Christian Brabandt [Sun, 5 Nov 2023 09:45:12 +0000 (10:45 +0100)] 
runtime(doc): document vim-script library function

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(dist): Make dist/vim.vim work properly when lacking vim9script support (...
Sean Dewar [Sun, 5 Nov 2023 09:11:37 +0000 (09:11 +0000)] 
runtime(dist): Make dist/vim.vim work properly when lacking vim9script support (#13487)

`:return` cannot be used outside of `:function` (or `:def`) in older Vims
lacking Vim9script support or in Neovim, even when evaluation is being skipped
in the dead `:else` branch.

Instead, use the pattern described in `:h vim9-mix`, which uses `:finish` to end
script processing before it reaches the vim9script stuff.

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2091: Vim9: cannot convert list to string using += v9.0.2091
Yegappan Lakshmanan [Sun, 5 Nov 2023 09:07:03 +0000 (10:07 +0100)] 
patch 9.0.2091: Vim9: cannot convert list to string using +=

Problem:  Vim9: cannot convert list to string using +=
          (after 9.0.2072)
Solution: convert dict index to string later in compile_member()

fixes: #13485
closes: #13486

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(dist): add legacy version for central vim library
Christian Brabandt [Sat, 4 Nov 2023 10:16:23 +0000 (11:16 +0100)] 
runtime(dist): add legacy version for central vim library

Also, enable the zip and gzip plugins by default, unless those variables
were not explicitly set by the user.

related: #13413

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(dist): centralize safe executable check and add vim library (#13413)
D. Ben Knoble [Sat, 4 Nov 2023 09:11:17 +0000 (05:11 -0400)] 
runtime(dist): centralize safe executable check and add vim library (#13413)

Follow up to 816fbcc26 (patch 9.0.1833: [security] runtime file fixes,
2023-08-31) and f7ac0ef50 (runtime: don't execute external commands when
loading ftplugins, 2023-09-06).

This puts the logic for safe executable checks in a single place, by introducing
a central vim library, so all filetypes benefit from consistency.

Notable changes:
- dist#vim because the (autoload) namespace for a new runtime support
  library. Supporting functions should get documentation. It might make
  life easier for NeoVim devs to make the documentation a new file
  rather than cram it into existing files, though we may want
  cross-references to it somewhere…
- The gzip and zip plugins need to be opted into by enabling execution
  of those programs (or the global plugin_exec). This needs
  documentation or discussion.
- This fixes a bug in the zig plugin: code setting s:tmp_cwd was removed
  in f7ac0ef50 (runtime: don't execute external commands when loading
  ftplugins, 2023-09-06), but the variable was still referenced. Since
  the new function takes care of that automatically, the variable is no
  longer needed.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(doc): clarify terminal capabilities for focus reporting
Christian Brabandt [Sat, 4 Nov 2023 09:03:52 +0000 (10:03 +0100)] 
runtime(doc): clarify terminal capabilities for focus reporting

closes: #13440

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2090: complete_info() skips entries with 'noselect' v9.0.2090
Christian Brabandt [Sat, 4 Nov 2023 08:58:14 +0000 (09:58 +0100)] 
patch 9.0.2090: complete_info() skips entries with 'noselect'

Problem:  complete_info() skips entries with 'noselect'
Solution: Check, if first entry is at original text state

Unfortunately, Commit daef8c74375141974d61b85199b383017644978c
introduced a regression, that when ':set completeopt+=noselect' is set
and no completion item has been selected yet, it did not fill the
complete_info['items'] list.

This happened, because the current match item did not have the
CP_ORIGINAL_TEXT flag set and then the cp->prev pointer did point to the
original flag item, which caused the following while loop to not being
run but being skipped instead.

So when the 'noselect' is set, only start with to the previous selection
item, if the initial completion item has the CP_ORIGINAL_TEXT flag set,
else use the 2nd previous item instead.

fixes: #13451
closes: #13452

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(doc): Add Makefile for the Vim documentation on Windows (#13467)
Restorer [Sat, 4 Nov 2023 08:57:09 +0000 (08:57 +0000)] 
runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)

* Makefile for the Vim documentation on Windows

* Corrected comments

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2089: sound_playfile() fails when using powershell v9.0.2089
GuyBrush [Sat, 4 Nov 2023 08:48:53 +0000 (09:48 +0100)] 
patch 9.0.2089: sound_playfile() fails when using powershell

Problem:  sound_playfile() fails when using powershell
Solution: quote filename using doublequotes, don't escape filename,
          because it doesn't use the shell

Avoiding powershell escaping because mci open command doesn't support
single quoted filenames: open 'C:\whatever\sound.wav' is not valid.

closes: #13471

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2088: Vim9: still allows abstract static methods v9.0.2088
Yegappan Lakshmanan [Sat, 4 Nov 2023 08:42:46 +0000 (09:42 +0100)] 
patch 9.0.2088: Vim9: still allows abstract static methods

Problem:  Vim9: still allows abstract static methods
          (after v9.0.2084, v9.0.2085 and v9.0.2087)
Solution: Disallow abstract static methods

closes: #13479

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(sh): Update sh syntax and add shDerefOffset to shDerefVarArray for bash ...
Lucien Grondin [Sat, 4 Nov 2023 08:41:37 +0000 (09:41 +0100)] 
runtime(sh): Update sh syntax and add shDerefOffset to shDerefVarArray for bash (#13480)

Add shDerefOffset to shDerefVarArray.

Example code:

```bash
declare -a a=({a..z})

echo "${a[@]:1:3}"
```

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(script.vim): make strace ft check less strict (#13482)
Jiri Slaby [Sat, 4 Nov 2023 08:39:54 +0000 (09:39 +0100)] 
runtime(script.vim): make strace ft check less strict (#13482)

Strace output, depending on parameters (-ttf this time), can dump both
times and pid:
  1038  07:14:20.959262 execve("./e.py", ["./e.py"], 0x7ffca1422840 /* 51 vars */) = 0 <0.000150>

So loose the regexp matching this, so that the above is matched too.

Fixes #13481.

Co-authored-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2087: build-failure in vim9class 12146/head v9.0.2087
Christian Brabandt [Thu, 2 Nov 2023 21:45:12 +0000 (22:45 +0100)] 
patch 9.0.2087: build-failure in vim9class

Problem:  build-failure in vim9class
Solution: reference correct error message,
          disable non-failing test

closes: #13476
closes: #13477

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2086: code cleanup for option callbacks needed v9.0.2086
zeertzjq [Thu, 2 Nov 2023 20:01:19 +0000 (21:01 +0100)] 
patch 9.0.2086: code cleanup for option callbacks needed

Problem:  code cleanup for option callbacks needed
Solution: remove flag os_doskip, it's not necessary, as we can check,
          whether an error message was returned

Remove unnecessary field os_doskip

Callback functions for boolean options set os_doskip immediately before
returning an error message, so os_doskip isn't actually needed.

closes: #13461

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2085: Vim9: abstract can be used in interface v9.0.2085
Yegappan Lakshmanan [Thu, 2 Nov 2023 19:57:32 +0000 (20:57 +0100)] 
patch 9.0.2085: Vim9: abstract can be used in interface

Problem:  Vim9: abstract can be used in interface
Solution: Disallow the use of abstract in an interface

fixes: #13456
closes: #13464

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2084: Vim9: abstract static methods are possible v9.0.2084
Yegappan Lakshmanan [Thu, 2 Nov 2023 19:43:57 +0000 (20:43 +0100)] 
patch 9.0.2084: Vim9: abstract static methods are possible

Problem:  Vim9: abstract static methods are possible
Solution: Disallow abstract static methods

fixes: #13462
closes: #13466

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(sh) Update sh syntax and add shDblParen to shCaseList (#13469)
Lucien Grondin [Thu, 2 Nov 2023 19:33:56 +0000 (20:33 +0100)] 
runtime(sh) Update sh syntax and add shDblParen to shCaseList (#13469)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2083: Perl: xsubpp may be in non-standard location v9.0.2083
Zdenek Dohnal [Thu, 2 Nov 2023 19:19:06 +0000 (20:19 +0100)] 
patch 9.0.2083: Perl: xsubpp may be in non-standard location

Problem:  Perl: xsubpp may be in non-standard location
Solution: Add --with-subpp configure option

configure.ac: Add --with-xsubpp configure option

Some environments (such as flatpaks) cannot count on xsubpp being
in the common Perl directory, so a configure option should be used for
clean solution.

closes: #13470

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(debversions): Add noble (24.04 LTS) as Ubuntu release name (#13472)
James McCoy [Thu, 2 Nov 2023 19:12:29 +0000 (15:12 -0400)] 
runtime(debversions): Add noble (24.04 LTS) as Ubuntu release name (#13472)

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2082: test_channel may fail because of IPv6 config issue v9.0.2082
James McCoy [Thu, 2 Nov 2023 19:05:38 +0000 (20:05 +0100)] 
patch 9.0.2082: test_channel may fail because of IPv6 config issue

Problem:  test_channel may fail because of IPv6 config issues
Solution: Catch and skip the test, if getaddrinfo() fails with
          'Address family not supported'

Mark tests as skipped when ch_open encounters E901

On some of the Debian build systems, the IPv6 channel tests fail because
`ch_open('[::1]:<port>', ...)` raises the error "E901: getaddrinfo() in
channel_open(): Address family for hostname not supported".

This appears to happen because getaddrinfo() can't perform the reverse
lookup for the ::1, which is a config issue on that system.  Therefore,
instead of reporting a test failure, mark the test as skipped due to the
bad network config

closes: #13473

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2081: smoothscroll may result in wrong cursor position v9.0.2081
Luuk van Baal [Sat, 28 Oct 2023 19:43:31 +0000 (21:43 +0200)] 
patch 9.0.2081: smoothscroll may result in wrong cursor position

Problem:  With 'smoothscroll' set, "w_skipcol" is not reset when unsetting 'wrap'.
          Resulting in incorrect calculation of the cursor position.
Solution: Reset "w_skipcol" when unsetting 'wrap'.

fixes:  #12970
closes: #13439

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(sh): add shDblParen to shLoopList for bash (#13445)
Lucien Grondin [Sat, 28 Oct 2023 19:40:48 +0000 (21:40 +0200)] 
runtime(sh): add shDblParen to shLoopList for bash (#13445)

add shDblParen to shLoopList to correctly highlight
arithmetic expressions for Bash and Ksh

This should allow code such as:

```bash
declare -i i j
for i in foo bar
do ((j = 1 << j))
done
```

Signed-off-by: Lucien Grondin <grondilu@yahoo.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2080: vim9_script test too large v9.0.2080
Yegappan Lakshmanan [Sat, 28 Oct 2023 19:28:48 +0000 (21:28 +0200)] 
patch 9.0.2080: vim9_script test too large

Problem:  vim9_script test too large
Solution: split vim9 type alias test into
          separate test file

Move type alias tests to a separate test file

closes: #13447

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(doc): all secure options should note this restriction in the documentation...
dkearns [Sat, 28 Oct 2023 19:26:19 +0000 (06:26 +1100)] 
runtime(doc): all secure options should note this restriction in the documentation (#13448)

Problem:  Not all secure options document their status
Solution: Describe secure context :set restrictions in each help entry

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.2079: Not all Dart files detected v9.0.2079
Doug Kearns [Sat, 28 Oct 2023 19:19:54 +0000 (21:19 +0200)] 
patch 9.0.2079: Not all Dart files detected

Problem:  Not all Dart files detected
Solution: Add shebang filetype detection for Dart

closes: #13449

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>