0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

18594 Commits

Author SHA1 Message Date
GuyBrush
15d270019e
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>
v9.0.2089
2023-11-04 09:54:00 +01:00
Yegappan Lakshmanan
5a53925a6e
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>
v9.0.2088
2023-11-04 09:42:46 +01:00
Lucien Grondin
ce3b0136c6
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>
2023-11-04 09:41:37 +01:00
Jiri Slaby
2f54c13292
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>
2023-11-04 09:39:54 +01:00
Christian Brabandt
33c1da7ff4
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>
v9.0.2087
2023-11-02 22:45:12 +01:00
zeertzjq
deba02ddd4
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>
v9.0.2086
2023-11-02 21:01:19 +01:00
Yegappan Lakshmanan
2b358adde0
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>
v9.0.2085
2023-11-02 20:58:58 +01:00
Yegappan Lakshmanan
ef9e3f8924
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>
v9.0.2084
2023-11-02 20:43:57 +01:00
Lucien Grondin
1858e2b22a
runtime(sh) Update sh syntax and add shDblParen to shCaseList (#13469)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:33:56 +01:00
Zdenek Dohnal
1b1c9f272d
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>
v9.0.2083
2023-11-02 20:19:06 +01:00
James McCoy
2b89afd5eb
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>
2023-11-02 20:12:29 +01:00
James McCoy
43cb8e1c3b
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>
v9.0.2082
2023-11-02 20:05:38 +01:00
Luuk van Baal
1bf1bf569b
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>
v9.0.2081
2023-10-28 21:43:31 +02:00
Lucien Grondin
a390e984db
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>
2023-10-28 21:40:48 +02:00
Yegappan Lakshmanan
171c50e0b0
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>
v9.0.2080
2023-10-28 21:31:53 +02:00
dkearns
8ebdbc9e6d
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>
2023-10-28 21:26:19 +02:00
Doug Kearns
c1c177a47b
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>
v9.0.2079
2023-10-28 21:21:49 +02:00
Yegappan Lakshmanan
feaccd2395
patch 9.0.2078: several problems with type aliases
Problem:  several problems with type aliases
Solution: Check for more error conditions, add tests,
          fix issues

Check for more error conditions and add additional tests

fixes  #13434
fixes  #13437
fixes  #13438
closes #13441

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.2078
2023-10-28 15:53:55 +02:00
Christian Brabandt
87ca5e86fa
patch 9.0.2077: CI fails because of trailing whitespace in test
Problem:  CI fails because of trailing whitespace in test
Solution: Remove it

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.2077
2023-10-27 19:48:38 +02:00
Yegappan Lakshmanan
ec3cebbd2b
patch 9.0.2076: Vim9: No support for type aliases
Problem:  Vim9: No support for type aliases
Solution: Implement :type command

A type definition is giving a name to a type specification.  This also known
type alias.

	:type ListOfStrings = list<string>

The type alias can be used wherever a built-in type can be used.  The type
alias name must start with an upper case character.

closes: #13407

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
v9.0.2076
2023-10-27 19:35:26 +02:00
Christian Brabandt
4bca4897a1
patch 9.0.2075: TextChangedI may not always trigger
Problem:  TextChangedI may not always trigger
Solution: trigger it in more cases: for insert/
          append/change operations, and when
          opening a new line,

fixes: #13367
closes: #13375

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
v9.0.2075
2023-10-27 19:26:49 +02:00
Christian Brabandt
daef8c7437
patch 9.0.2074: Completion menu may be wrong
Problem:  Completion menu may be wrong
Solution: Check for the original direction of the completion menu,
          add more tests, make it work with 'noselect'

completion: move in right direction when  filling completion_info()

When moving through the insert completion menu and switching directions,
we need to make sure we start at the correct position in the list and
move correctly forward/backwards through it, so that we do not skip
entries and the selected item points to the correct entry in the list
of completion entries generated by the completion_info() function.

The general case is this:

1) CTRL-X CTRL-N, we will traverse the list starting from
   compl_first_match and then go forwards (using the cp->next pointer)
   through the list (skipping the very first entry, which has the
   CP_ORIGINAL_TEXT flag set (since that is the empty/non-selected entry

2) CTRL-X CTRL-P, we will traverse the list starting from
   compl_first_match (which now points to the last entry). The previous
   entry will have the CP_ORIGINAL_TEXT flag set, so we need to start
   traversing the list from the second prev pointer.

There are in fact 2 special cases after starting the completion menu
with CTRL-X:

3)  CTRL-N and then going backwards by pressing CTRL-P again.
    compl_first_match will point to the same entry as in step 1 above,
    but since compl_dir_foward() has been switched by pressing CTRL-P
    to backwards we need to pretend to be in still in case 1 and still
    traverse the list in forward direction using the cp_next pointer

4)  CTRL-P and then going forwards by pressing CTRL-N again.
    compl_first_match will point to the same entry as in step 2 above,
    but since compl_dir_foward() has been switched by pressing CTRL-N
    to forwards we need to pretend to be in still in case 2 and still
    traverse the list in backward direction using the cp_prev pointer

For the 'noselect' case however, this is slightly different again. When
going backwards, we only need to go one cp_prev pointer back. And
resting of the direction works again slightly different. So we need to
take the noselect option into account when deciding in which direction
to iterate through the list of matches.

related: #13402
related: #12971
closes: #13408

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.2074
2023-10-27 19:16:26 +02:00
nwounkn
650dcfc8d1
runtime(netrw): don't echo empty lines (#13431)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27 19:07:38 +02:00
zeertzjq
b0221819f3
patch 9.0.2073: typo in quickfix.c comments
Problem:  typo in quickfix.c comments
Solution: fix them

closes: #13422

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
v9.0.2073
2023-10-26 23:15:44 +02:00
James McCoy
7b7cda67a1
runtime(debian): update debian related runtime files (#13423)
* Update Debian runtime files

Add mantic as a supported Ubuntu release and move buster/kinetic to
unsupported.

Add syntax highlighting for deb822sources filetype.

Add debsources ftplugin to set relevant comment options.

Move common version information to shared/debversions.vim

Closes #11934

Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Co-authored-by: James Addison <jay@jp-hosting.net>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Signed-off-by: James McCoy <jamessan@jamessan.com>

* Add myself as codeowner for Debian-related runtime files

Signed-off-by: James McCoy <jamessan@jamessan.com>

---------

Signed-off-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Co-authored-by: James Addison <jay@jp-hosting.net>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 23:14:30 +02:00
Yegappan Lakshmanan
c229a6ac07
patch 9.0.2072: Vim9: no nr2str conversion in list-unpack
Problem:  Vim9: no nr2str conversion in list-unpack
Solution: Generate 2STRING instruction to convert dict index to string

Generate instruction to convert dict index to a string

fixes:  #13417
closes: #13424

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
v9.0.2072
2023-10-26 23:05:07 +02:00
Colin Kennedy
10407df7a9
patch 9.0.2071: objdump files not recognized
Problem:  objdump files not recognized
Solution: detect *.objdump files, add a filetype plugin

Added the objdump file/text format

closes: #13425

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
v9.0.2071
2023-10-26 23:03:15 +02:00
Christian Brabandt
6b89dd6a72
patch 9.0.2070: [security] disallow setting env in restricted mode
Problem:  [security] disallow setting env in restricted mode
Solution: Setting environment variables in restricted mode could
          potentially be used to execute shell commands. Disallow this.

restricted mode: disable allow setting of environment variables

Setting environment variables in restricted mode, may have some unwanted
consequences. So, for example by setting $GCONV_PATH in restricted mode
and then calling the iconv() function, one may be able to execute some
unwanted payload, because the `iconv_open()` function internally uses
the `$GCONV_PATH` variable to find its conversion data.

So let's disable setting environment variables, even so this is no
complete protection, since we are not clearing the existing environment.
I tried a few ways but wasn't successful :(

One could also argue to disable the iconv() function completely in
restricted mode, but who knows what other API functions can be
influenced by setting some other unrelated environment variables.
So let's leave it as it is currently.

closes: #13394
See: https://huntr.com/bounties/b0a2eda1-459c-4e36-98e6-0cc7d7faccfe/

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.2070
2023-10-26 22:24:17 +02:00
David Leadbeater
67ec655383
patch 9.0.2069: possible to escape bracketed paste mode with Ctrl-C
Problem:  possible to escape bracketed paste mode with Ctrl-C
Solution: Do not handle Ctrl-C specially when key_protocol
          is in use, makes bracketed paste mode more robust

When a key protocol is in use Ctrl-C will be sent as an escape sequence,
but a raw Ctrl-C can be sent when pasting data. Pass this through, so
that a Ctrl-C can be pasted and won't result in exiting insert mode
(where the rest of the pasted keys can cause all kind of nasty
side-effects).

Many terminals will strip control characters in paste data (and xterm
will strip ^C since version 388), but this provides some defense in
depth if users change settings like xterm's allowPasteControls.

closes: #13398

Signed-off-by: David Leadbeater <dgl@dgl.cx>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.2069
2023-10-26 22:08:41 +02:00
Christian Brabandt
9198c1f2b1
patch 9.0.2068: [security] overflow in :history
Problem:  [security] overflow in :history
Solution: Check that value fits into int

The get_list_range() function, used to parse numbers for the :history
and :clist command internally uses long variables to store the numbers.
However function arguments are integer pointers, which can then
overflow.

Check that the return value from the vim_str2nr() function is not larger
than INT_MAX and if yes, bail out with an error. I guess nobody uses a
cmdline/clist history that needs so many entries... (famous last words).

It is only a moderate vulnerability, so impact should be low.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.2068
2023-10-26 21:29:32 +02:00
Christian Brabandt
5f5131d775
runtime(doc): clarify bracketed paste mode
related: #13398

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 21:53:09 +02:00
Christian Brabandt
a56f02d824
runtime(doc): missing code formatting in if_pyth.txt
fixes: #13418

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 21:21:56 +02:00
Ken Takata
c4a4038603
patch 9.0.2067: xxd: coloring was disabled on Cygwin
Problem:  xxd: coloring was disabled on Cygwin
Solution: don't include WIN32

xxd: Fix that color was disabled on Cygwin

"windows.h" was unintentionally included on Cygwin since 9.0.1834.
This accidentally disabled coloring on Cygwin.
Stop including "windows.h" on Cygwin.

closes: #13414

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
v9.0.2067
2023-10-25 21:17:35 +02:00
OldWorldOrdr
1c14030aff
patch 9.0.2066: xxd: corrupting files when reversing bit dumps
Problem:  xxd: corrupting files when reversing bit dumps
Solution: handle reversing bit dump slightly differently

fixes:  #13410
closes: #13415

Co-authored-by: OldWorldOrdr <joey.t.reinhart@gmail.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: tristhaus <tristhaus@yahoo.de>
v9.0.2066
2023-10-25 20:57:30 +02:00
Doug Kearns
3932072ab4
patch 9.0.2065: EXPAND flag set for filetype option
Problem:  EXPAND flag set for filetype option
Solution: Remove P_EXPAND flag from the 'filetype' option

Remove P_EXPAND flag from the 'filetype' option

Problem:  P_EXPAND flag is erroneously set for 'filetype' option
Solution: Remove the P_EXPAND flag

This flag is used by string options that accept file path values.  See
:help set_env.

This appears to have been included in d5e8c92 and resulted from an
incorrect implementation of 'filetype' completion.

See #12900 for a small discussion.

related: #12900
closes: #13416

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
v9.0.2065
2023-10-25 20:54:00 +02:00
Yegappan Lakshmanan
b731800522
patch 9.0.2064: cannot use buffer-number for errorformat
Problem:  cannot use buffer-number for errorformat
Solution: add support for parsing a buffer number using '%b' in
          'errorformat'

closes: #13419

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
v9.0.2064
2023-10-25 20:50:28 +02:00
h_east
5985879e3c
runtime(doc): Fix typos in several documents (#13420)
* Fix typos in several documents
* Update runtime/doc/terminal.txt

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 14:47:05 +01:00
Christian Brabandt
50f3ec2898
please report security issues to the vim-security list
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-23 19:59:22 +02:00
Guido Cella
7d254dbc2d
patch 9.0.2063: pacman hooks are detected as conf filetype
Problem:  pacman hooks are detected as conf filetype
Solution: make it consistent to pacman.conf and detect those
          hooks as confini

Because confini has much better syntax highlighting than conf.

For reference, I identified pacman.conf and pacman hooks as dosini in
https://github.com/vim/vim/pull/6335, then
https://github.com/vim/vim/pull/10213 changed them to conf, then
https://github.com/vim/vim/pull/10518 changed pacman.conf to confini but
forgot to change hooks.

closes: #13399

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Guido Cella <guido@guidocella.xyz>
v9.0.2063
2023-10-23 19:27:06 +02:00
Doug Kearns
c038427d2a
patch 9.0.2062: Janet files are not recognised
Problem:  Janet files are not recognised
Solution: Add filename and shebang detection (without
          adding an extra filetype plugin)

Those are used by the Janet language:
http://www.janet-lang.org

closes: #13400

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
v9.0.2062
2023-10-23 19:24:05 +02:00
Guido Cella
ae9021a840
patch 9.0.2061: not able to detect xkb filetypes
Problem:  not able to detect xkb filetypes
Solution: Detect files below /u/s/X11/xkb as xkb files (without adding
          an extra filetype)

Those files are used from the X11 xkb extension

closes: #13401

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Guido Cella <guido@guidocella.xyz>
v9.0.2061
2023-10-23 19:19:46 +02:00
Amaan Qureshi
84394f2be4
patch 9.0.2060: *.{gn,gni} files are not recognized
Problem:  *.{gn,gni} files are not recognized
Solution: Detect some as gn filetype (without adding an extra filetype)

Those come from: https://gn.googlesource.com/gn/

closes: #13405

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
v9.0.2060
2023-10-23 19:16:14 +02:00
Ernie Rael
a5a1534753
runtime(doc): small updates to the documentation for varargs
- update and correct the documentation for varargs for Vim9 and make
  sure to mention that a <list> type is required.
- mention that 3match is used the matchparen plugin before 9.0.2054
  (actually this is not correct, but before that patch, Vim used the
  hardcoded id 3)

closes: #13403
closes: #13409

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-23 19:13:16 +02:00
dkearns
fea96c00e5
runtime(vim): Update ftplugin - comment motions (#13412)
Fix the pattern used by comment-motion mappings to match the start of a
block comment.

Block-comment start lines were being ignored if the previous line
contained a double-quote character anywhere in the line.  Line comments
should only be ignored if the previous line is a full-line comment and,
therefore, part of the current block comment.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-23 18:16:44 +02:00
Yegappan Lakshmanan
0ab500dede
patch 9.0.2059: outstanding exceptions may be skipped
Problem:  outstanding exceptions may be skipped
Solution: When restoring exception state, process remaining outstanding
          exceptions

closes: #13386

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
v9.0.2059
2023-10-21 11:59:42 +02:00
zeertzjq
a36acb7ac4
patch 9.0.2058: tests: avoid error when no swap files exist
Problem:  tests: avoid error when no swap files exist
Solution: use unlet! so that no error message is reported
          in case the variable does not exists

When s:GetSwapFileList() does not find any swapfiles, it will return an
empty list []. This means, that the variable 'name' will not be
declared, cause the following unlet command to fail and causing a 1 sec
delay on running the tests.

So let's instead use the :unlet! command which simply skips reporting an
error when the variable given as parameter does not exists.

closes: #13396

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
v9.0.2058
2023-10-21 11:50:26 +02:00
Ernie Rael
3ec6c1fe3b
patch 9.0.2057: Vim9: no strict type checks for funcrefs varargs
Problem:  Vim9: no strict type checks for funcrefs varargs
Solution: Perform strict type checking when declaring funcrefs
          with vararg declaration, add tests

closes: #13397

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
v9.0.2057
2023-10-21 11:45:38 +02:00
Christian Brabandt
d3e277f279
matchparen: do not use hard-coded match id (#13393)
* matchparen: do not use hard-coded match id

Instead of using the hard-coded match id 3, which may also be used by
other plugins, let the matchparen plugin use whatever ids are
automatically returned when calling matchaddpos().

For backwards-compatibility, keep the `:3match` call, which will still
use the hard-coded id 3 (as mentioned in :h :3match).

closes: #13381

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-21 11:06:50 +02:00
Jonathan Wright
47416d1a74
patch 9.0.2056: no digraph for quadruple prime
Problem:  no digraph for quadruple prime
Solution: add quadruple prime digraph using 4'

closes: #13380

Signed-off-by: Jonathan Wright <quaggy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Jonathan Wright <quaggy@gmail.com>
v9.0.2056
2023-10-20 12:08:09 +02:00
Ernie Rael
d4802ec485
patch 9.0.2055: Vim9: non-consistent error messages
Problem:  Vim9: non-consistent error messages
Solution: make error messages more consistent with common structure

Adjust vim9class messages to follow common pattern.
[Variable|Method] "var-or-meth-name" ... class "class-name"

closes: #13391

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
v9.0.2055
2023-10-20 11:59:00 +02:00