]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
2 years agopatch 9.0.1968: cmdline completion should consider key option v9.0.1968
Yee Cheng Chin [Sun, 1 Oct 2023 07:13:22 +0000 (09:13 +0200)] 
patch 9.0.1968: cmdline completion should consider key option

Problem:  cmdline completion should consider key option
Solution: Disable cmdline completion for key option, slightly
          refactor how P_NO_CMD_EXPAND is handled

Harden crypto 'key' option: turn off cmdline completion, disable set-=

"set-=" can be used maliciously with a crypto key, as it allows an
attacker (who either has access to the computer or a plugin author) to
guess a substring by observing the modified state. Simply turn off
set+=/-=/^= for this option as there is no good reason for them to be
used.

Update docs to make that clear as well.

Also, don't allow cmdline completion for 'key' as it just shows *****
which is not useful and confusing to the user what it means (if the user
accidentally hits enter they will have replaced their key with "*****"
instead).

Move logic to better location, don't use above 32-bit for flags

Move P_NO_CMD_EXPAND to use the unused 0x20 instead of going above
32-bits, as currently the flags parameter is only 32-bits on some
systems. Left a comment to warn that future additions will need to
change how the flags work either by making it 64-bit or split into two
member vars.

Also, move the logic for detecting P_NO_CMD_EXPAND earlier so it's not
up to each handler to decide, and you won't see the temporary "..." that
Vim shows while waiting for completion handler to complete.

closes: #13224

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1967: xattr errors not translated v9.0.1967
zeertzjq [Sun, 1 Oct 2023 07:07:14 +0000 (09:07 +0200)] 
patch 9.0.1967: xattr errors not translated

Problem:  xattr errors not translated
Solution: mark for translation, consistently capitalize
          first letter.

closes: #13236

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1966: configure prints stray 6 when checking libruby v9.0.1966
Illia Bobyr [Sat, 30 Sep 2023 20:59:27 +0000 (22:59 +0200)] 
patch 9.0.1966: configure prints stray 6 when checking libruby

Problem:  configure prints stray 6 when checking libruby
Solution: redirect stdout to dev/null

configure: Do not print "6" when checking for libruby

`expr` will print the matched string length to the standard output.
Current `configure` output looks like this:

```
checking Ruby header files...  /usr/include/ruby-3.1.0
6
```

The script really only cares about `expr` exit code.

closes: #13234

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2 years agopatch 9.0.1965: wrong auto/configure script v9.0.1965
Illia Bobyr [Sat, 30 Sep 2023 20:57:19 +0000 (22:57 +0200)] 
patch 9.0.1965: wrong auto/configure script

Problem:  wrong auto/configure script
Solution: regenerate with autoconf 2.71

configure: sys/xattr.hs: Regenerate with autoconf 2.71

It seems that `auto/configure` update in

  commit 6de4e58cf27a3bb6e81653ca63b77e29d1bb46f2 (tag: v9.0.1963)
  Author: zeertzjq <zeertzjq@outlook.com>
  Date:   Sat Sep 30 14:19:14 2023 +0200

      patch 9.0.1963: Configure script may not detect xattr

      Problem:  Configure script may not detect xattr correctly
      Solution: include sys/xattr instead of attr/xattr,
                make Test_write_with_xattr_support() test
                xattr feature correctly

      This also applies to the Smack security feature, so change the include
      and configure script for it as well.

      closes: #13229

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
was done manually, and missed an update to the generated variable name.

closes: #13235

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2 years agopatch 9.0.1964: xattr support fails to build on MacOS X v9.0.1964
Christian Brabandt [Sat, 30 Sep 2023 16:51:36 +0000 (18:51 +0200)] 
patch 9.0.1964: xattr support fails to build on MacOS X

Problem:  xattr support fails to build on MacOS X
Solution: Disable xattr support for MacOS X

MacOS X uses the same headers and functions sys/xattr.h but the function
signatures for xattr support are much different, so building fails.

So let's for now disable xattr support there.

closes: #13230
closes: #13232

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1963: Configure script may not detect xattr v9.0.1963
zeertzjq [Sat, 30 Sep 2023 12:19:14 +0000 (14:19 +0200)] 
patch 9.0.1963: Configure script may not detect xattr

Problem:  Configure script may not detect xattr correctly
Solution: include sys/xattr instead of attr/xattr,
          make Test_write_with_xattr_support() test
          xattr feature correctly

This also applies to the Smack security feature, so change the include
and configure script for it as well.

closes: #13229

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1962: No support for writing extended attributes v9.0.1962
Christian Brabandt [Sat, 30 Sep 2023 10:49:18 +0000 (12:49 +0200)] 
patch 9.0.1962: No support for writing extended attributes

Problem:  No support for writing extended attributes
Solution: Add extended attribute support for linux

It's been a long standing issue, that if you write a file with extended
attributes and backupcopy is set to no, the file will loose the extended
attributes.

So this patch adds support for retrieving the extended attributes and
copying it to the new file. It currently only works on linux, mainly
because I don't know the different APIs for other systems (BSD, MacOSX and
Solaris).  On linux, this should be supported since Kernel 2.4 or
something, so this should be pretty safe to use now.

Enable the extended attribute support with normal builds.

I also added it explicitly to the :version output as well as make it
able to check using `:echo has("xattr")`, to have users easily check
that this is available.

In contrast to the similar support for SELINUX and SMACK support (which
also internally uses extended attributes), I have made this a FEAT_XATTR
define, instead of the similar HAVE_XATTR.

Add a test and change CI to include relevant packages so that CI can
test that extended attributes are correctly written.

closes: #306
closes: #13203

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1961: 'listchars' completion misses "multispace" and "leadmultispace" v9.0.1961
zeertzjq [Sat, 30 Sep 2023 10:43:07 +0000 (12:43 +0200)] 
patch 9.0.1961: 'listchars' completion misses "multispace" and "leadmultispace"

Problem:  Cmdline completion for 'listchars' fields doesn't include
          "multispace" and "leadmultispace" (after 9.0.1958).
Solution: Include "multispace" and "leadmultispace" in lcstab.

closes: #13225

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1960: Make CI checks more strict v9.0.1960
Yee Cheng Chin [Sat, 30 Sep 2023 10:28:50 +0000 (12:28 +0200)] 
patch 9.0.1960: Make CI checks more strict

Problem:  Make CI checks more strict
Solution: Add -Wstrict-prototypes -Wmissing-prototypes to CI,
          fix uncovered problems

Add -Wstrict-prototypes -Wmissing-prototypes warnings check to CI

Add two new warnings to CI, silence some Perl related build-warnings:

- `strict-prototypes` helps prevent declaring a function with an empty
  argument list, e.g. `int func()`. In C++, that's equivalent to `int
  func(void)`, but in C, that means a function that can take any number
  of arguments which is rarely what we want.

- `missing-prototypes` makes sure we use `static` for file-only internal
  functions. Non-static functions should have been declared on a
  prototype file.

- Add `no-compound-token-split-by-macro` to the perl cflags, since it
  throws out a bunch of perl-related warnings that make the CI log
  unnecessary verbose and hard to read. This seems to happen only with
  clang 12 and above.

When applying those changes, it already uncovered a few warnings, so fix
up the code as well (fix prototypes, make the code static, remove
shadowed var declaration)

GTK header needs to have #pragma warning suppressiong because GTK2
headers will warn on `-Wstrict-prototypes`, and it's included by gui.h
and so we can't just turn off the warning in a couple files.

closes: #13223
closes: #13226

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1959: Vim9: methods parameters and types are covariant v9.0.1959
Yegappan Lakshmanan [Fri, 29 Sep 2023 20:50:02 +0000 (22:50 +0200)] 
patch 9.0.1959: Vim9: methods parameters and types are covariant

Problem:  Vim9: methods parameters and types are covariant
Solution: Support contra-variant type check for object method arguments
          (similar to Dart).

closes: #12965
closes: #13221

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1958: cannot complete option values v9.0.1958
Yee Cheng Chin [Fri, 29 Sep 2023 18:42:32 +0000 (20:42 +0200)] 
patch 9.0.1958: cannot complete option values

Problem:  cannot complete option values
Solution: Add completion functions for several options

Add cmdline tab-completion for setting string options

Add tab-completion for setting string options on the cmdline using
`:set=` (along with `:set+=` and `:set-=`).

The existing tab completion for setting options currently only works
when nothing is typed yet, and it only fills in with the existing value,
e.g. when the user does `:set diffopt=<Tab>` it will be completed to
`set diffopt=internal,filler,closeoff` and nothing else. This isn't too
useful as a user usually wants auto-complete to suggest all the possible
values, such as 'iblank', or 'algorithm:patience'.

For set= and set+=, this adds a new optional callback function for each
option that can be invoked when doing completion. This allows for each
option to have control over how completion works. For example, in
'diffopt', it will suggest the default enumeration, but if `algorithm:`
is selected, it will further suggest different algorithm types like
'meyers' and 'patience'. When using set=, the existing option value will
be filled in as the first choice to preserve the existing behavior. When
using set+= this won't happen as it doesn't make sense.

For flag list options (e.g. 'mouse' and 'guioptions'), completion will
take into account existing typed values (and in the case of set+=, the
existing option value) to make sure it doesn't suggest duplicates.

For set-=, there is a new `ExpandSettingSubtract` function which will
handle flag list and comma-separated options smartly, by only suggesting
values that currently exist in the option.

Note that Vim has some existing code that adds special handling for
'filetype', 'syntax', and misc dir options like 'backupdir'. This change
preserves them as they already work, instead of converting to the new
callback API for each option.

closes: #13182

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1957: termcap options should change when setting keyprotocol v9.0.1957
Gregory Anders [Fri, 29 Sep 2023 18:17:20 +0000 (20:17 +0200)] 
patch 9.0.1957: termcap options should change when setting keyprotocol

Problem:  termcap options should change on keyprotocol setting
Solution: Apply termcap entries when 'keyprotocol' changes

When the 'keyprotocol' option was set after startup (including in a
user's .vimrc) the termcap entries associated with the matching protocol
were not applied. Thus, setting the option has no affect.

When 'keyprotocol' is changed it should also update the termcap entries.

closes: #13211

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2 years agopatch 9.0.1956: Custom completion skips orig cmdline if it invokes glob() v9.0.1956
zeertzjq [Fri, 29 Sep 2023 17:58:35 +0000 (19:58 +0200)] 
patch 9.0.1956: Custom completion skips orig cmdline if it invokes glob()

Problem:  Custom cmdline completion skips original cmdline when pressing
          Ctrl-P at first match if completion function invokes glob().
Solution: Move orig_save into struct expand_T.

closes: #13216

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1955: Vim9: lockvar issues with objects/classes v9.0.1955
Ernie Rael [Fri, 29 Sep 2023 17:53:55 +0000 (19:53 +0200)] 
patch 9.0.1955: Vim9: lockvar issues with objects/classes

Problem:  Vim9: lockvar issues with objects/classes
Solution: fix `get_lhs()` object/class access and avoid `SEGV`,
          make error messages more accurate.

- `get_lval()` detects/returns object/class access
- `compile_lock_unlock()` generate code for bare static and obj_arg access
- `do_lock_var()` check lval for `ll_object`/`ll_class` and fail if so.

Details:
- Add `ll_object`/`ll_class`/`ll_oi` to `lval_T`.
- Add `lockunlock_T` to `isn_T` for `is_arg` to specify handling of `lval_root` in `get_lval()`.
- In `get_lval()`, fill in `ll_object`/`ll_class`/`ll_oi` as needed; when no `[idx] or .key`, check lval_root on the way out.
- In `do_lock_var()` check for `ll_object`/`ll_class`; also bullet proof ll_dict case
  and give `Dictionay required` if problem. (not needed to avoid lockvar crash anymore)
- In `compile_lock_unlock()` compile for the class variable and func arg cases.

closes: #13174

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agopatch 9.0.1954: CI: change netrw label in labeller bot v9.0.1954
Ken Takata [Fri, 29 Sep 2023 17:48:09 +0000 (19:48 +0200)] 
patch 9.0.1954: CI: change netrw label in labeller bot

Problem:  CI: change netrw label in labeller bot
Solution: Rename it to 'plugin-netrw'

closes: #13217

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2 years agopatch 9.0.1953: Misplaced comment in errors.h v9.0.1953
Ken Takata [Fri, 29 Sep 2023 17:45:42 +0000 (19:45 +0200)] 
patch 9.0.1953: Misplaced comment in errors.h

Problem:  Misplaced comment in errors.h
Solution: Move it up

closes: #13218

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2 years agopatch 9.0.1952: Vim9: unused static field v9.0.1952
Yegappan Lakshmanan [Fri, 29 Sep 2023 17:43:11 +0000 (19:43 +0200)] 
patch 9.0.1952: Vim9: unused static field

Problem:  Vim9: unused static field
Solution: remove it and simplify code

closes: #13220

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(doc): text-objects: document how escaped delimiters are handled
Christian Brabandt [Thu, 28 Sep 2023 22:09:28 +0000 (00:09 +0200)] 
runtime(doc): text-objects: document how escaped delimiters are handled

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1951: Vim9: hard to debug vim9_class errors from CI v9.0.1951
Yegappan Lakshmanan [Thu, 28 Sep 2023 21:06:48 +0000 (23:06 +0200)] 
patch 9.0.1951: Vim9: hard to debug vim9_class errors from CI

Problem:  Vim9: hard to debug vim9_class errors from CI
Solution: Include the line number in assert_xxx() calls.  Include the
          entire error message in the tests.  Fix the indentation in the
          test file.  Add tags for new error codes.

closes: #13206

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1950: Vim9: error codes spread out v9.0.1950
Yegappan Lakshmanan [Thu, 28 Sep 2023 20:46:37 +0000 (22:46 +0200)] 
patch 9.0.1950: Vim9: error codes spread out

Problem:  Vim9: error codes spread out
Solution: group them together and reserve 100
          more for future use

Reserve 100 error codes for future enhancements to the Vim9 class
support

closes: #13207

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1949: Vim9: allows reserved keywords as members v9.0.1949
Yegappan Lakshmanan [Thu, 28 Sep 2023 20:28:15 +0000 (22:28 +0200)] 
patch 9.0.1949: Vim9: allows reserved keywords as members

Problem:  Vim9: allows reserved keywords as members
Solution: Disallow reserved keywords, disallow
          duplicate object and class variables

closes: #13209

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1948: Vim9: object variable "this." should only be used in constructor v9.0.1948
h-east [Thu, 28 Sep 2023 20:18:19 +0000 (22:18 +0200)] 
patch 9.0.1948: Vim9: object variable "this." should only be used in constructor

Problem:  Vim9: object variable "this." should only be used in
          constructor
Solution: Disallow to this in normal object methods (other than
          constructors)

closes: #13152
closes: #13212

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
2 years agopatch 9.0.1947: Bash Expansion test fails on Windows/MacOS v9.0.1947
Ken Takata [Thu, 28 Sep 2023 19:59:58 +0000 (21:59 +0200)] 
patch 9.0.1947: Bash Expansion test fails on Windows/MacOS

Problem:  Bash Expansion test fails on Windows/MacOS
Solution: Disable Test_glob_extended_bash for now

This test doesn't work on Windows even if bash can be executed, since
the globstar functionality has only been enabled in Unix builds of Vim
(Commit 9eb1ce531527a7177d16373b0f8689bbcd3d5f73, patch 9.0.1946).

closes: #13205

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2 years agoruntime(doc): regenerate xxd manpage
Christian Brabandt [Wed, 27 Sep 2023 21:33:39 +0000 (23:33 +0200)] 
runtime(doc): regenerate xxd manpage

Commit f6fc255e8d9c46a0e51e (v9.0.1834) updated xxd.1 but the xxd.man
page wasn't re-generated. So let's just regenerate it now.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1946: filename expansion using ** in bash may fail v9.0.1946
Christian Brabandt [Wed, 27 Sep 2023 17:08:25 +0000 (19:08 +0200)] 
patch 9.0.1946: filename expansion using ** in bash may fail

Problem:  filename expansion using ** in bash may fail
Solution: Try to enable the globstar setting

Starting with bash 4.0 it supports extended globbing using the globstar
shell option. This makes matching recursively below a certain directory
using the ** pattern work as expected nowadays.  However, we need to
explicitly enable this using the 'shopt -s globstar' bash command.

So let's check the bash environment variable $BASH_VERSINFO (which is
supported since bash 3.0 and conditionally enable the globstar option,
if the major version is at least 4. For older bashs, this at least
shouldn't cause errors (unless one is using really ancient bash 2.X or
something).

closes: #13002
closes: #13144

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1945: Vim9: missing support for ro-vars in interface v9.0.1945
Yegappan Lakshmanan [Wed, 27 Sep 2023 17:02:01 +0000 (19:02 +0200)] 
patch 9.0.1945: Vim9: missing support for ro-vars in interface

Problem:  Vim9: missing support for ro-vars in interface
Solution: Support only read-only object variables in an interface,
          add additional checks when parsing class definitions.

closes: #13183
cloess: #13184
cloess: #13185.
closes: #13188

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(doc): mention mouse scrolling in scrollbind-quickadj (#13190)
zeertzjq [Wed, 27 Sep 2023 17:00:12 +0000 (01:00 +0800)] 
runtime(doc): mention mouse scrolling in scrollbind-quickadj (#13190)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(swayconfig): Update syntax file (#13192)
Josef Litoš [Wed, 27 Sep 2023 16:58:15 +0000 (18:58 +0200)] 
runtime(swayconfig): Update syntax file (#13192)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(i3config): update i3config syntax (#13191)
Josef Litoš [Wed, 27 Sep 2023 16:57:24 +0000 (18:57 +0200)] 
runtime(i3config): update i3config syntax (#13191)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(rmd) Update ftplugin and syntax files (#13193)
Jakson Alves de Aquino [Wed, 27 Sep 2023 16:56:02 +0000 (13:56 -0300)] 
runtime(rmd) Update ftplugin and syntax files (#13193)

ftplugin/rmd.vim:

  - Set 'commentstring' dynamically according to code region.

syntax/rmd.vim:

  - Include syntax highlighting of fenced languages dynamically.
  - Add conceal char for line break.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1944: Vim9: function instruction pointer invalidated v9.0.1944
Yegappan Lakshmanan [Wed, 27 Sep 2023 16:51:43 +0000 (18:51 +0200)] 
patch 9.0.1944: Vim9: function instruction pointer invalidated

Problem:  Vim9: function instruction pointer invalidated
Solution: Use the funcref index instead of the instruction pointer

closes: #13178
closes: #13196

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agotranslation(sr): Update Serbian messages translation
Ivan Pešić [Wed, 27 Sep 2023 16:48:42 +0000 (20:48 +0400)] 
translation(sr): Update Serbian messages translation

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1943: CI not run with clang-17 v9.0.1943
Philip H [Mon, 25 Sep 2023 19:05:00 +0000 (21:05 +0200)] 
patch 9.0.1943: CI not run with clang-17

Problem:  CI not run with clang-17
Solution: Update CI to use clang-17

closes: #12745

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2 years agopatch 9.0.1942: Vim9: execution stack invalidated with null object v9.0.1942
Yegappan Lakshmanan [Mon, 25 Sep 2023 19:00:46 +0000 (21:00 +0200)] 
patch 9.0.1942: Vim9: execution stack invalidated with null object

Problem:  Vim9: execution stack invalidated with null object
Solution: Check for a null object before adjusting the execution stack

closes: #13186

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(sh): only invoke bash help in ftplugin if it has been detected to be bash...
Eisuke Kawashima [Mon, 25 Sep 2023 18:40:45 +0000 (03:40 +0900)] 
runtime(sh): only invoke bash help in ftplugin if it has been detected to be bash (#13171)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1941: Memory leak detected v9.0.1941
Yegappan Lakshmanan [Mon, 25 Sep 2023 10:13:17 +0000 (12:13 +0200)] 
patch 9.0.1941: Memory leak detected

Problem:  Memory leak detected (after 9.0.1928)
Solution: Free arg_objm in get_lambda_tv()

closes: #13181

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(doc): Update help tags (#13180)
Yegappan Lakshmanan [Mon, 25 Sep 2023 07:19:48 +0000 (00:19 -0700)] 
runtime(doc): Update help tags (#13180)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1940: wrong upstream version in libvterm README v9.0.1940
Christian Brabandt [Sun, 24 Sep 2023 21:42:19 +0000 (23:42 +0200)] 
patch 9.0.1940: wrong upstream version in libvterm README

Problem:  wrong upstream version in libvterm README
Solution: correct version to 839

related: #12746

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1939: still a problem when processing LSP RPC requests v9.0.1939
Yegappan Lakshmanan [Sun, 24 Sep 2023 21:38:46 +0000 (23:38 +0200)] 
patch 9.0.1939: still a problem when processing LSP RPC requests

Problem:  still a problem when processing LSP RPC requests
Solution: When processing async LSP RPC requests, compare sequence
          numbers only in response messages

A LSP request message can be sent to the language server either
synchronously (ch_evalexpr) or asynchronously (ch_sendexpr). In both
cases, when looking for response messages by using the sequence number,
LSP requests messages from the language server with the same sequence
number should not be used. Patch 9.0.1927 fixed this issue for
synchronous requests. This PR fixes the issue for asynchronous requests
and adds additional tests.

closes: #13158

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(todo): Update Vim9 class items (#13148)
Yegappan Lakshmanan [Sun, 24 Sep 2023 21:36:56 +0000 (14:36 -0700)] 
runtime(todo): Update Vim9 class items (#13148)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(doc): Vim9: Consistenly use class/object variable and class/object method...
Yegappan Lakshmanan [Sun, 24 Sep 2023 21:36:17 +0000 (14:36 -0700)] 
runtime(doc): Vim9: Consistenly use class/object variable and class/object method in help (#13149)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1938: multispace wrong when scrolling horizontally v9.0.1938
zeertzjq [Sun, 24 Sep 2023 21:32:18 +0000 (23:32 +0200)] 
patch 9.0.1938: multispace wrong when scrolling horizontally

Problem:  multispace wrong when scrolling horizontally
Solution: Update position in "multispace" or "leadmultispace" also in
          skipped chars. Reorder conditions to be more consistent.

closes: #13145
closes: #13147

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1937: missing test for mouse click + 'virtedit' v9.0.1937
zeertzjq [Sun, 24 Sep 2023 21:30:03 +0000 (23:30 +0200)] 
patch 9.0.1937: missing test for mouse click + 'virtedit'

Problem:  missing test for mouse click + 'virtedit'
Solution: Add test for clicking after eol with 'virtualedit' and wrapped
          line

closes: #13157

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1936: test: using wrong expected message in test_crypt v9.0.1936
Isao Sato [Sun, 24 Sep 2023 21:27:25 +0000 (23:27 +0200)] 
patch 9.0.1936: test: using wrong expected message in test_crypt

Problem:  test: using wrong expected message in test_crypt
Solution: make use of single quotes

closes: #13151

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Isao Sato <svardew@gmail.com>
2 years agopatch 9.0.1935: Vim9: not consistent error messages v9.0.1935
RestorerZ [Sun, 24 Sep 2023 21:21:24 +0000 (23:21 +0200)] 
patch 9.0.1935: Vim9: not consistent error messages

Problem:  Vim9: not consistent error messages
Solution: Make error messages more consistent. Use "variable" for
          (object/class) member

closes: #13155

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
2 years agopatch 9.0.1934: :bwipe fails after switching window from aucmd_win. v9.0.1934
zeertzjq [Sun, 24 Sep 2023 21:16:08 +0000 (23:16 +0200)] 
patch 9.0.1934: :bwipe fails after switching window from aucmd_win.

Problem:  :bwipe fails after switching window from aucmd_win.
Solution: Decrement b_nwindows after switching back to aucmd_win.

closes: #13160

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1933: Can change the type of a v: variable using if_lua v9.0.1933
zeertzjq [Sun, 24 Sep 2023 21:13:51 +0000 (23:13 +0200)] 
patch 9.0.1933: Can change the type of a v: variable using if_lua

Problem:  Can change the type of a v: variable using if_lua.
Solution: Add additional handling of v: variables like :let.

closes: #13161

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1932: Vim9: error when using null object constructor v9.0.1932
Yegappan Lakshmanan [Sun, 24 Sep 2023 21:09:10 +0000 (23:09 +0200)] 
patch 9.0.1932: Vim9: error when using null object constructor

Problem:  Vim9: error when using null object constructor
Solution: Check for a null object only when calling an object method

closes: #13154
closes: #13163

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(doc): grammar fixes in doc (#13164)
Dominique Pellé [Sun, 24 Sep 2023 21:07:39 +0000 (23:07 +0200)] 
runtime(doc): grammar fixes in doc (#13164)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(doc): Update the version9.txt with a template for version 9.1 enhancements...
Yegappan Lakshmanan [Sun, 24 Sep 2023 21:07:03 +0000 (14:07 -0700)] 
runtime(doc): Update the version9.txt with a template for version 9.1 enhancements (#13165)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(doc): Add a missing '<' to the help of strutf16len() (#13168)
a5ob7r [Sun, 24 Sep 2023 21:05:47 +0000 (06:05 +0900)] 
runtime(doc): Add a missing '<' to the help of strutf16len() (#13168)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1931: make test_compilers fails on ubuntu v9.0.1931
Dominique Pellé [Sun, 24 Sep 2023 20:57:41 +0000 (22:57 +0200)] 
patch 9.0.1931: make test_compilers fails on ubuntu

Problem:  make test_compilers fails on ubuntu
Solution: set LC_ALL=C

fix: make test_compiler failed on xubuntu 22.04.3

Problem: 'make test_compiler' failed on Linux xubuntu 22.04.3 but
         succeeded on e.g. macOS. To reproduce:
```
$ ./configure --with-features=huge --enable-gui=no --enable-perlinterp=yes
$ make -j12
$ cd vim/src/testdir
$ make test_compiler
...snip...
Found errors in Test_compiler():
command line..script /home/dope/sb/vim/src/testdir/runtest.vim[601]..function RunTheTest[54]..Test_compiler line 24: command did not fail: clist
command line..script /home/dope/sb/vim/src/testdir/runtest.vim[601]..function RunTheTest[54]..Test_compiler line 30: Pattern '\\n \\d\\+ Xfoo.pl:3: Global symbol "$foo" requires explicit package name' does not match '\n19 Xfoo.pl:3: Global symbol "$foo" requires explicit package name (did you forget to declare "my $foo"?)'
make: *** [Makefile:70: test_compiler] Error 1
```
Solution: set `LC_ALL` to "C" in `Test_compiler()`

closes: #13173

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2 years agoruntime(tutor): fix typo in tutor.nl (#13175)
Remy Bos [Sun, 24 Sep 2023 20:54:30 +0000 (22:54 +0200)] 
runtime(tutor): fix typo in tutor.nl (#13175)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1930: compiler warnings with clang-17 v9.0.1930
Dominique Pellé [Sun, 24 Sep 2023 14:12:07 +0000 (16:12 +0200)] 
patch 9.0.1930: compiler warnings with clang-17

Problem:  compiler warnings with clang-17
Solution: Fix function prototypes and function pointer

fix: clang compilation warnings with -Wstrict-prototypes

Change fixes this kind of compilation warnings with clang:
```
proto/if_python3.pro:13:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
   13 | int python3_version();
      |                    ^
      |                     void
```

closes: #13166

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2 years agopatch 9.0.1929: runtime tests fail with tiny vim v9.0.1929
Dominique Pellé [Sun, 24 Sep 2023 14:09:31 +0000 (16:09 +0200)] 
patch 9.0.1929: runtime tests fail with tiny vim

Problem:  runtime tests fail with tiny vim
Solution: check for tiny vim, run runtime tests in CI
          even for tiny version

closes: #13169
closes: #13170

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2 years agopatch 9.0.1928: Vim9: constructor type checking bug v9.0.1928
h-east [Sun, 24 Sep 2023 13:46:31 +0000 (15:46 +0200)] 
patch 9.0.1928: Vim9: constructor type checking bug

Problem:  Vim9: constructor type checking bug
Solution: Fix class constructor regression

closes: #13102
closes: #13113

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
2 years agopatch 9.0.1927: patch 1916 (fixed terminal size) not optimal v9.0.1927
Christian Brabandt [Thu, 21 Sep 2023 14:55:06 +0000 (16:55 +0200)] 
patch 9.0.1927: patch 1916 (fixed terminal size) not optimal

Problem:  patch 1916 (fixed terminal size) not optimal
Solution: Add defines to make it easier changeable later

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1926: Vim9: not enough info in error message v9.0.1926
Ernie Rael [Thu, 21 Sep 2023 14:42:28 +0000 (16:42 +0200)] 
patch 9.0.1926: Vim9: not enough info in error message

Problem:  Vim9: not enough info in error message
Solution: Add class name, change member to variable, quote names

closes: #13136

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agopatch 9.0.1925: if_python: still undefined behaviour with function pointer v9.0.1925
Yee Cheng Chin [Thu, 21 Sep 2023 14:40:12 +0000 (16:40 +0200)] 
patch 9.0.1925: if_python: still undefined behaviour with function pointer

Problem:  if_python: still undefined behaviour with function pointer
Solution: fix remaining problems

Fix remaining issues in the if_python code in casting incompatible
function pointers leading to Clang 17 giving runtime errors during
UBSAN.

closes: #13140

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1924: LSP server message still wrongly handled (after 9.0.1922) v9.0.1924
Yegappan Lakshmanan [Thu, 21 Sep 2023 14:36:28 +0000 (16:36 +0200)] 
patch 9.0.1924: LSP server message still wrongly handled (after 9.0.1922)

Problem:  LSP server message still wrongly handled (after 9.0.1922)
Solution: Handle 'method' messages properly, don't discard them, add
          tests.

closes: #13141

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1923: curswant wrong on click with 've' and 'wrap' set v9.0.1923
zeertzjq [Thu, 21 Sep 2023 14:33:09 +0000 (16:33 +0200)] 
patch 9.0.1923: curswant wrong on click with 've' and 'wrap' set

Problem:  curswant wrong on click with 've' and 'wrap' set
Solution: Add w_leftcol to mouse click column.

closes: #13142

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agoruntime(doc): format jumplist examples more consistently (#13137)
zeertzjq [Thu, 21 Sep 2023 06:22:57 +0000 (14:22 +0800)] 
runtime(doc): format jumplist examples more consistently (#13137)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1922: LSP server request message is misinterpreted as a response message v9.0.1922
Yegappan Lakshmanan [Wed, 20 Sep 2023 18:32:55 +0000 (20:32 +0200)] 
patch 9.0.1922: LSP server request message is misinterpreted as a response message

Problem:  LSP server request message is misinterpreted as a response message
Solution: Check that the message does not have the "message" field

closes: #13133

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1921: not possible to use the jumplist like a stack v9.0.1921
Yegappan Lakshmanan [Wed, 20 Sep 2023 18:20:04 +0000 (20:20 +0200)] 
patch 9.0.1921: not possible to use the jumplist like a stack

Problem:  not possible to use the jumplist like a stack
Solution: Add the 'jumpoptions' setting to make the jumplist
          a stack.

Add an option for using jumplist like tag stack

related: #7738
closes: #13134

ported from NeoVim:

- https://neovim.io/doc/user/motion.html#jumplist-stack
- neovim/neovim@39094b3
- neovim/neovim#11530
- https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior

Based on the feedback in the previous PR, it looks like many people like
this option.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com>
2 years agopatch 9.0.1920: Vim9: cannot write public var in nested object v9.0.1920
Ernie Rael [Wed, 20 Sep 2023 18:13:06 +0000 (20:13 +0200)] 
patch 9.0.1920: Vim9: cannot write public var in nested object

Problem:  Vim9: cannot write public var in nested object
Solution: Write variable in nested read-only object reference.
          Also test write fails.

closes: #13130
closes: #13131

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agopatch 9.0.1919: Wrong curswant when clicking on empty line or with vsplits v9.0.1919
zeertzjq [Wed, 20 Sep 2023 18:08:40 +0000 (20:08 +0200)] 
patch 9.0.1919: Wrong curswant when clicking on empty line or with vsplits

Problem:  Wrong curswant when clicking on empty line or with vsplits.
Solution: Don't check for ScreenCols[] before the start of the window
          and handle empty line properly.

closes: #13132

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1918: No filetype detection for Authzed filetypes v9.0.1918
Matt Polzin [Wed, 20 Sep 2023 18:03:52 +0000 (20:03 +0200)] 
patch 9.0.1918: No filetype detection for Authzed filetypes

Problem:  No filetype detection for Authzed filetypes
Solution: Detect the *.zed file extension as authzed filetype

closes: #13129

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Matt Polzin <mpolzin@workwithopal.com>
2 years agopatch 9.0.1917: undefined behaviour with python function pointer v9.0.1917
Yee Cheng Chin [Wed, 20 Sep 2023 17:59:47 +0000 (19:59 +0200)] 
patch 9.0.1917: undefined behaviour with python function pointer

Problem:  undefined behaviour with python function pointer
Solution: correctly cast function pointers from void

Fix more undefined behaviors in if_python

Fix remaining UBSAN errors from Clang 17 in if_python in casting
function pointers.

Also fix a mistake where `PyMem_Free()` should be returning void, by the
dynamic build is mistakenly casting it as a function that returns an
int.

closes: #13128

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1916: Crash when allocating large terminal screen v9.0.1916
Christian Brabandt [Tue, 19 Sep 2023 19:05:20 +0000 (21:05 +0200)] 
patch 9.0.1916: Crash when allocating large terminal screen

Problem:  Crash when allocating large terminal screen
Solution: Don't allow values > 1000 for terminal
          screen columns and rows

closes: #13126

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1915: r_CTRL-C works differently in visual mode v9.0.1915
Christian Brabandt [Tue, 19 Sep 2023 18:41:51 +0000 (20:41 +0200)] 
patch 9.0.1915: r_CTRL-C works differently in visual mode

Problem:  r_CTRL-C works differently in visual mode
Solution: Make r_CTRL-C behave consistent in visual mode
          in terminal and Windows GUI

in visual mode, r CTRL-C behaves strange in Unix like environments. It
seems to end visual mode, but still is waiting for few more chars,
however it never seems to replace it by any characters and eventually
just returns back into normal mode.

In contrast in Windows GUI mode, r_CTRL-C replaces in the selected area
all characters by a literal CTRL-C.

Not sure why it behaves like this. It seems in the Windows GUI, got_int
is not set and therefore behaves as if any other normal character has
been pressed.

So remove the special casing of what happens when got_int is set and
make it always behave like in Windows GUI mode. Add a test to verify it
always behaves like replacing in the selected area each selected
character by a literal CTRL-C.

closes: #13091
closes: #13112

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1914: Vim9: few issues when accessing object members v9.0.1914
Yegappan Lakshmanan [Tue, 19 Sep 2023 18:34:05 +0000 (20:34 +0200)] 
patch 9.0.1914: Vim9: few issues when accessing object members

Problem:  Vim9: few issues when accessing object members
Solution: When calling an object method, check for null object.
          Accessing a Dict object member doesn't work.

closes: #13119
closes: #13123
closes: #13124

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1913: if_python: undefined behaviour for function pointers v9.0.1913
Yee Cheng Chin [Tue, 19 Sep 2023 18:30:22 +0000 (20:30 +0200)] 
patch 9.0.1913: if_python: undefined behaviour for function pointers

Problem:  if_python: undefined behaviour for function pointers
Solution: Fix if_python undefined behavior for function pointer casts

Identified by clang 17 UBSAN (see #12745). Make sure to cast function
pointers with the same signature only.

closes: #13122

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1912: Cirrus-CI running out of credits v9.0.1912
Christian Brabandt [Tue, 19 Sep 2023 18:16:46 +0000 (20:16 +0200)] 
patch 9.0.1912: Cirrus-CI running out of credits

Problem:  Cirrus-CI running out of credits
Solution: disable Cirrus-CI for now

We are running out of credits for Cirrus CI already at the middle of the
month and unfortunately this means our CI now consistently fails. This
all hapens because cirrus ci is not enforcing the free-tier limits (see also
https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/).

Perhaps at the beginning of the next month we can revisit and
enable just a build without testing it.  Hopefully this is won't take
too many credits and we can at least verify that building works.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1911: Vim9: segfault with null object and instanceof() v9.0.1911
Ernie Rael [Tue, 19 Sep 2023 18:14:18 +0000 (20:14 +0200)] 
patch 9.0.1911: Vim9: segfault with null object and instanceof()

Problem:  Vim9: segfault with null object and instanceof()
Solution: return early

closes: #13121

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agoruntime(doc): add help tag describing object-selection
Christian Brabandt [Mon, 18 Sep 2023 18:11:37 +0000 (20:11 +0200)] 
runtime(doc): add help tag describing object-selection

closes: #13114

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1910: Mac OS X: missing sound support on older versions v9.0.1910
Sevan Janiyan [Mon, 18 Sep 2023 18:04:32 +0000 (20:04 +0200)] 
patch 9.0.1910: Mac OS X: missing sound support on older versions

Problem:  Mac OS X: missing sound support on older versions
Solution: Check Macro MAC_OS_X_VERSION_MIN_REQUIRED

Extend guard for sound support on OS X

Fixes build on legacy versions where required coreaudio functionality
may not be available. NSSoundDelegate apparently was introduced in Snow
Leopard yet the build breaks on it. Guarding off enabling sound support
to El Capitan as that's the next version I had access to for testing (it
may work on earlier versions)
https://developer.apple.com/documentation/appkit/nssounddelegate Vim
builds on OS X Tiger 10.4 and newer with this change.

closes: #13115

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sevan Janiyan <venture37@geeklan.co.uk>
2 years agopatch 9.0.1909: Vim9: problem calling class method from other class v9.0.1909
Yegappan Lakshmanan [Mon, 18 Sep 2023 17:56:49 +0000 (19:56 +0200)] 
patch 9.0.1909: Vim9: problem calling class method from other class

Problem:  Vim9: problem calling class method from other class
Solution: Fix this problem, fix readonly object access, update error
          messages.

Calling a class method from another method without the class name prefix
doesn't work properly.

A readonly object variable is modifiable outside the class using a
nested object assignment.

Remove the unused E1338 error message.

Update error messages.

closes: #13116

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1908: undefined behaviour upper/lower function ptrs v9.0.1908
Yee Cheng Chin [Mon, 18 Sep 2023 17:51:56 +0000 (19:51 +0200)] 
patch 9.0.1908: undefined behaviour upper/lower function ptrs

Problem:  undefined behaviour upper/lower function ptrs
Solution: Fix UBSAN error in regexp and simplify upper/lowercase
          modifier code

The implementation of \u / \U / \l / \L modifiers in the substitute
command relies on remembering the state by setting function pointers on
func_all/func_one in the code. The code signature of `fptr_T` is
supposed to return void* (due to C function signatures not being able to
return itself due to type recursion), and the definition of the
functions (e.g. to_Upper) didn't follow this rule, and so the code tries
to cast functions of different signatures, resulting in undefined
behavior error under UBSAN in Clang 17. See #12745.

We could just fix `do_Upper`/etc to just return void*, which would fix
the problem. However, these functions actually do not need to return
anything at all. It used to be the case that there was only one pointer
"func" to store the pointer, which is why the function needs to either
return itself or NULL to indicate whether it's a one time or ongoing
modification. However, c2c355df6f094cdb9e599fd395a78c14486ec697
(7.3.873) already made that obsolete by introducing `func_one` and
`func_all` to store one-time and ongoing operations separately, so these
functions don't actually need to return anything anymore because it's
implicit whether it's a one-time or ongoing operation. Simplify the code
to reflect that.

closes: #13117

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agoruntime(netrw): fix filetype detection for remote editing files
Christian Brabandt [Sun, 17 Sep 2023 16:52:56 +0000 (18:52 +0200)] 
runtime(netrw): fix filetype detection for remote editing files

closes: #12990
closes: #12992

this partially reverses commit 71badf9 by commenting out the line that
intentionally sets the filetype to an empty string.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(kotlin): Add Kotlin runtime files (#13110)
dkearns [Sun, 17 Sep 2023 16:51:22 +0000 (02:51 +1000)] 
runtime(kotlin): Add Kotlin runtime files (#13110)

Closes udalov/kotlin-vim#39

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1907: No support for liquidsoap filetypes v9.0.1907
Romain Beauxis [Sun, 17 Sep 2023 16:49:20 +0000 (18:49 +0200)] 
patch 9.0.1907: No support for liquidsoap filetypes

Problem:  No support for liquidsoap filetypes
Solution: Add liquidsoap filetype detection code

closes: #13111

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Romain Beauxis <toots@rastageeks.org>
2 years agopatch 9.0.1906: Vim9: Interfaces should not support class methods and variables v9.0.1906
Yegappan Lakshmanan [Sun, 17 Sep 2023 15:03:19 +0000 (17:03 +0200)] 
patch 9.0.1906: Vim9: Interfaces should not support class methods and variables

Problem:  Vim9: Interfaces should not support class methods and
          variables
Solution: Make sure interface follow the interface specification

Vim9 interface changes to follow the new interface specification:

1) An interface can have only read-only and read-write instance
   variables.
2) An interface can have only public instance methods.
3) An interface cannot have class variables and class methods.
4) An interface cannot have private instance variables and private
   instance methods.
5) A interface can extend another interface using "extends". The
   sub-interface gets all the variables and methods in the super
   interface.

That means:
- Interfaces should not support class methods and variables.
- Adjust error numbers and add additional tests.
- Interface methods can be defined in one of the super classes.
- Interface variables can be defined in one of the super classes.
  and instance variables can be repeated in sub interfaces.
- Check the class variable types with the type in interface.

closes: #13100

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1905: FEAT_FLOAT no longer defined v9.0.1905
dundargoc [Sun, 17 Sep 2023 14:58:22 +0000 (16:58 +0200)] 
patch 9.0.1905: FEAT_FLOAT no longer defined

Problem:  FEAT_FLOAT no longer defined
Solution: Remove last existing FEAT_FLOAT ifdefs in
          message_test

Remove FEAT_FLOAT as that should always be true

FEAT_FLOAT has been removed in v9.0.0491 (73e28dcc6125f616cf1f2) but
unfortunately, it was forgotten to remove it from message_test.c. So
let's remove the last mentioned ifdefs which are now unused.

closes: #13106

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2 years agopatch 9.0.1904: Cirrus-CI fails because we have used all credits v9.0.1904
dundargoc [Sun, 17 Sep 2023 14:53:18 +0000 (16:53 +0200)] 
patch 9.0.1904: Cirrus-CI fails because we have used all credits

Problem:  Cirrus-CI fails because we have used all credits
Solution: Remove FreeBSD 13.1 and MacOS M1

Cirrus CI has started introducing monthly limits. Vim has exceeded the
monthly limit which means our CI unfortunately starts to fail. So let's
remove some CI tasks, so that in the future we won't run out of credits
so fast.

closes: #13108

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2 years agodoc(INSTALLpc): mention additional packages for msys2
Christian Brabandt [Sun, 17 Sep 2023 14:36:33 +0000 (16:36 +0200)] 
doc(INSTALLpc): mention additional packages for msys2

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1903: CI fails because snd-dummy modules missing v9.0.1903
Christian Brabandt [Sat, 16 Sep 2023 16:29:42 +0000 (18:29 +0200)] 
patch 9.0.1903: CI fails because snd-dummy modules missing

Problem:  Github Actions fails because snd-dummy modules missing
          in current runner images
Solution: ignore modprobe error

related: actions/runner-images#8295

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(man): Man plugin does not respect 'gdefault'
Yee Cheng Chin [Sat, 16 Sep 2023 16:09:47 +0000 (18:09 +0200)] 
runtime(man): Man plugin does not respect 'gdefault'

Fix the issue introduced by #12557. `:substitute` commands in plugins
need to take into account whether `gdefault` is set or not because
that depends on the user.

closes: #13097

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1902: Vim9: Coverity complains about dead code v9.0.1902
Yegappan Lakshmanan [Sat, 16 Sep 2023 16:05:07 +0000 (18:05 +0200)] 
patch 9.0.1902: Vim9: Coverity complains about dead code

Problem:  Vim9: Coverity complains about dead code
Solution: Copy only object methods from the super class
          to a subclass when extending a class.  Fix
          Coverity warning.

closes: #13103

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1901: win32: not correctly freeing environment v9.0.1901
Ken Takata [Sat, 16 Sep 2023 11:56:02 +0000 (13:56 +0200)] 
patch 9.0.1901: win32: not correctly freeing environment

Problem:  win32: not correctly freeing environment
Solution: After we call GetEnvironmentStringsW, we should call
          FreeEnvironmentStringsW

closes: #13096
closes: #13094

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2 years agopatch 9.0.1900: Configure script uses non-portable == comparison v9.0.1900
Yee Cheng Chin [Sat, 16 Sep 2023 11:38:26 +0000 (13:38 +0200)] 
patch 9.0.1900: Configure script uses non-portable == comparison

Problem:  Configure script uses non-portable == comparison
Solution: Use the standard and portable "=" instead

closes: #13095
closes: #13099

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1899: potential buffer overflow in PBYTE macro v9.0.1899
Christian Brabandt [Fri, 15 Sep 2023 18:22:02 +0000 (20:22 +0200)] 
patch 9.0.1899: potential buffer overflow in PBYTE macro

Problem:  potential buffer overflow in PBYTE macro
Solution: Check returned memline length

closes: #13083

the PBYTE macro is used to put byte c at a position lp of the returned
memline. However, in case of unexpected errors ml_get_buf() may return
either "???" or an empty line in which case it is quite likely that we
are causing a buffer overrun.

Therefore, switch the macro PBYTE (which is only used in ops.c anyhow)
to a function, that verifies that we will only try to access within the
given length of the buffer.

Also, since the macro is only used in ops.c, move the definition from
macros.h to ops.c

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1898: Vim9: restrict access to static vars v9.0.1898
Yegappan Lakshmanan [Fri, 15 Sep 2023 18:14:55 +0000 (20:14 +0200)] 
patch 9.0.1898: Vim9: restrict access to static vars

Problem:  Vim9: restrict access to static vars and methods
Solution: Class members are accesible only from the class where they are
          defined.

Based on the #13004 discussion, the following changes are made:

    1) Static variables and methods are accessible only using the class
       name and inside the class where they are defined.
    2) Static variables and methods can be used without the class name in
       the class where they are defined.
    3) Static variables of a super class are not copied to the sub class.
    4) A sub class can declare a class variable with the same name as the
       super class.
    5) When a method or member is found during compilation, use more
       specific error messages.

This aligns the Vim9 class variable/method implementation with the Dart
implementation.

Also while at it, ignore duplicate class and object methods.

The access level of an object method can however be changed in a
subclass.

For the tests, use the new CheckSourceFailure() function instead of the
CheckScriptFailure() function in the tests.

closes: #13086

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(vim): Highlight all :loadkeymap abbreviations in vim syntax (#13092)
dkearns [Fri, 15 Sep 2023 18:12:50 +0000 (04:12 +1000)] 
runtime(vim): Highlight all :loadkeymap abbreviations in vim syntax (#13092)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(forth): Fix :unlet error in ftplugin (#13090)
dkearns [Fri, 15 Sep 2023 14:47:06 +0000 (00:47 +1000)] 
runtime(forth): Fix :unlet error in ftplugin (#13090)

Fixes #13089.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(help): Updated documentation on editorconfig
Christian Brabandt [Tue, 12 Sep 2023 19:08:54 +0000 (21:08 +0200)] 
runtime(help): Updated documentation on editorconfig

Add a small section about the distributed Editorconfig plugin at :h
usr_05.txt just below the matchit plugin.  While editing that help
document, also add a bit of more documentation about standard plugins
and local help file additions.

Regenerate $VIMRUNTIME/doc/tags file with all the new tags from the rust
runtime files.

While at it, update the Editorconfig help page (and re-generate the
helptags file).

closes: #13078

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(swayconfig): improve syntax highlighting (#13060)
Josef Litoš [Tue, 12 Sep 2023 18:24:47 +0000 (20:24 +0200)] 
runtime(swayconfig): improve syntax highlighting (#13060)

* syntax(swayconfig): improved highlighting
* syntax(swayconfig): adapt to i3config structure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(rust): sync rust runtime files with upstream (#13075)
Gregory Anders [Tue, 12 Sep 2023 18:23:38 +0000 (13:23 -0500)] 
runtime(rust): sync rust runtime files with upstream (#13075)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(i3config): syntax structure cleanup (#13080)
Josef Litoš [Tue, 12 Sep 2023 18:20:25 +0000 (20:20 +0200)] 
runtime(i3config): syntax structure cleanup (#13080)

* syntax(i3config): improved i3config highlighting
* syntax(i3config): refactor structure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(doc): documentation updates
Christian Brabandt [Tue, 15 Aug 2023 22:11:09 +0000 (00:11 +0200)] 
runtime(doc): documentation updates

This is a collection of various improvements to the help pages

closes #12790

Co-authored-by: Houl <anwoku@yahoo.de>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agosyntax(i3config): improved i3config highlighting (#13054)
Josef Litoš [Mon, 11 Sep 2023 18:12:48 +0000 (20:12 +0200)] 
syntax(i3config): improved i3config highlighting (#13054)

Signed-off-by: Christian Brabandt <cb@256bit.org>