]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
21 months agoruntime(json5): Add new ftplugin (#13385)
dkearns [Thu, 19 Oct 2023 18:00:12 +0000 (05:00 +1100)] 
runtime(json5): Add new ftplugin (#13385)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2053: zig filetype detection test wrong v9.0.2053
Gregory Anders [Thu, 19 Oct 2023 17:57:57 +0000 (19:57 +0200)] 
patch 9.0.2053: zig filetype detection test wrong

Problem:  zig filetype detection test wrong
Solution: Remove .zir pattern, add new test for .zon pattern

closes: #13389

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gregory Anders <greg@gpanders.com>
21 months agopatch 9.0.2052: win32: using deprecated wsock32 api v9.0.2052
Ken Takata [Thu, 19 Oct 2023 15:22:24 +0000 (17:22 +0200)] 
patch 9.0.2052: win32: using deprecated wsock32 api

Problem:  win32: using deprecated wsock32 api
Solution: Use winsock2 (ws2_32) consistently

win32: Stop using wsock32

We have already used ws2_32 (winsock2) and already dropped support for
Windows 95 and NT4.  So, we don't need to care about wsock32.

Use ws2_32 consistently.

closes: #13383

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
21 months agopatch 9.0.2051: Vim9: wrong error for non-existing object var v9.0.2051
Yegappan Lakshmanan [Thu, 19 Oct 2023 15:18:28 +0000 (17:18 +0200)] 
patch 9.0.2051: Vim9: wrong error for non-existing object var

Problem:  Vim9: wrong error for non-existing object var
Solution: mention object or class depending on whether
          the var is an object or class variable.

closes: #13384
closes: #13387

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
21 months agoruntime(zig): Update Zig runtime files (#13388)
Gregory Anders [Thu, 19 Oct 2023 15:16:59 +0000 (10:16 -0500)] 
runtime(zig): Update Zig runtime files (#13388)

Update runtime files from upstream (https://github.com/zig/zig.vim) at
commit 54c216e5306a5c3878a60596aacb94dca8652ab9.

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoRemove mention of huntr.dev since they do no longer support us
Christian Brabandt [Thu, 19 Oct 2023 15:12:19 +0000 (17:12 +0200)] 
Remove mention of huntr.dev since they do no longer support us

They do no longer support us, since they are shifting away to AI/ML
projects only. So remove any mentioned of using huntr.dev
https://huntr.com/new-huntr-faq/

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoPatch 9.0.2050v2: Missing change to version.c
Christian Brabandt [Thu, 19 Oct 2023 15:04:04 +0000 (17:04 +0200)] 
Patch 9.0.2050v2: Missing change to version.c

Problem:  v9.0.2050 missed the change to version.c
Solution: include the version.c change

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2050: Vim9: crash with deferred function call and exception v9.0.2050
Yegappan Lakshmanan [Thu, 19 Oct 2023 08:52:34 +0000 (10:52 +0200)] 
patch 9.0.2050: Vim9: crash with deferred function call and exception

Problem:  Vim9: crash with deferred function call and exception
Solution: Save and restore exception state

Crash when a deferred function is called after an exception and another
exception is thrown

closes: #13376
closes: #13377

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
21 months agopatch 9.0.2049: Vim9: not recognizing qualified class vars for infix ops v9.0.2049
Yegappan Lakshmanan [Thu, 19 Oct 2023 08:47:53 +0000 (10:47 +0200)] 
patch 9.0.2049: Vim9: not recognizing qualified class vars for infix ops

Problem:  Vim9: not recognizing qualified class vars for infix ops
Solution: Drop the class type from the stack before generating the
          CLASSMEMBER instruction

closes: #13378
closes: #13379

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
21 months agopatch 9.0.2048: python: uninitialized warning v9.0.2048
Ken Takata [Wed, 18 Oct 2023 10:02:24 +0000 (12:02 +0200)] 
patch 9.0.2048: python: uninitialized warning

Problem:  python: uninitialized warning
Solution: initialize 'minor' always

win32,py3: Fix uninitialized warning

Fix the following warning:
```
if_python3.c: In function 'py3_get_system_libname':
if_python3.c:879:16: warning: 'minor' may be used uninitialized [-Wmaybe-uninitialized]
  879 |             if (minor == PY_MINOR_VERSION)
      |                ^
if_python3.c:839:24: note: 'minor' was declared here
  839 |         long    major, minor;
      |                        ^~~~~
```

closes: #13368

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
21 months agopatch 9.0.2047: perl: warning about inconsistent dll linkage v9.0.2047
Ken Takata [Wed, 18 Oct 2023 09:59:44 +0000 (11:59 +0200)] 
patch 9.0.2047: perl: warning about inconsistent dll linkage

Problem:  perl: warning about inconsistent dll linkage
Solution: suppress warning

Suppress warning C4273 (inconsistent DLL linkage).

Also adjust inconsistent use of const.

closes: #13369

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
21 months agopatch 9.0.2046: win32,python: warning that MS_WIN64 got re-defined v9.0.2046
Ken Takata [Wed, 18 Oct 2023 09:53:30 +0000 (11:53 +0200)] 
patch 9.0.2046: win32,python: warning that MS_WIN64 got re-defined

Problem:  win32,python: warning that MS_WIN64 got re-defined
Solution: Do not define MS_WIN64, as it is no longer used

Suppress the following warning:
```
In file included from C:/Python312-64/include/Python.h:12,
                 from if_python3.c:79:
C:/Python312-64/include/pyconfig.h:240: warning: "MS_WIN64" redefined
  240 | #define MS_WIN64
      |
<command-line>: note: this is the location of the previous definition
```

`MS_WIN64` is not defined in `Make_mvc.mak` either.
This should be able to be safely removed.

closes: #13370

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
21 months agopatch 9.0.2045: tests: checking for swap files takes time v9.0.2045
zeertzjq [Wed, 18 Oct 2023 09:50:37 +0000 (11:50 +0200)] 
patch 9.0.2045: tests: checking for swap files takes time

Problem:  tests: checking for swap files takes time
Solution: don't check for swap files  when test has been skipped

Check for swap files takes a considerable about of time, so don't do
that for skipped tests to avoid wasting time.

closes: #13371

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
21 months agopatch 9.0.2044: Vim9: exceptions confuse defered functions v9.0.2044
Yegappan Lakshmanan [Wed, 18 Oct 2023 09:47:37 +0000 (11:47 +0200)] 
patch 9.0.2044: Vim9: exceptions confuse defered functions

Problem:  Vim9: exceptions confuse defered functions
Solution: save and restore exception state when calling defered
          functions

closes: #13364
closes: #13372

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
21 months agoruntime(systemd): allow for overriding systemd ftplugin settings (#13373)
Enno [Wed, 18 Oct 2023 09:38:19 +0000 (11:38 +0200)] 
runtime(systemd): allow for overriding systemd ftplugin settings (#13373)

closes: #13357

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2043: Vim9: issue with funcref assignmentand varargs v9.0.2043
Ernie Rael [Tue, 17 Oct 2023 16:15:01 +0000 (18:15 +0200)] 
patch 9.0.2043: Vim9: issue with funcref assignmentand varargs

Problem:  Vim9: issue with funcref assignmentand varargs
Solution: Fix funcref type checking

closes: #13351

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
21 months agopatch 9.0.2042: Test_cq_zero_exmode fails without channel feature v9.0.2042
Christian Brabandt [Tue, 17 Oct 2023 16:10:13 +0000 (18:10 +0200)] 
patch 9.0.2042: Test_cq_zero_exmode fails without channel feature

Problem:  Test_cq_zero_exmode fails without channel feature
Solution: Make the test check the channel feature

closes: #13365

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2041: trim(): hard to use default mask v9.0.2041
Illia Bobyr [Tue, 17 Oct 2023 16:00:50 +0000 (18:00 +0200)] 
patch 9.0.2041: trim(): hard to use default mask

Problem:  trim(): hard to use default mask (partly revert v9.0.2040)
Solution: use default mask when it is empty

The default 'mask' value is pretty complex, as it includes many
characters.  Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.

Currently, an empty 'mask' will make 'trim()' call return 'text' value
that is passed in unmodified.  It is unlikely that someone is using it,
so the chances of scripts being broken by this change are low.

Also, this reverts commit 9.0.2040 (which uses v:none for the default
and requires to use an empty string instead).

closes: #13358

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
21 months agoruntime(json5): include syntax script for json5 (#13356)
Rolf Vidar Mazunki Hoksaas [Tue, 17 Oct 2023 09:13:06 +0000 (11:13 +0200)] 
runtime(json5): include syntax script for json5 (#13356)

Merging syntax file from gutenye/json5.vim, modified to include proper
vim header.

See: https://github.com/vim/vim/issues/8499

Signed-off-by: Mazunki Hoksaas <rolferen@gmail.com>
Co-authored-by: Guten Ye <ywzhaifei@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2040: trim(): hard to use default mask v9.0.2040
Illia Bobyr [Tue, 17 Oct 2023 09:09:45 +0000 (11:09 +0200)] 
patch 9.0.2040: trim(): hard to use default mask

Problem:  trim(): hard to use default mask
Solution: Use default 'mask' when it is v:none

The default 'mask' value is pretty complex, as it includes many
characters.  Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.

'v:none' is already used to mean "use the default argument value" in
user defined functions.  See |none-function_argument| in help.

closes: #13363

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
21 months agopatch 9.0.2039: completion shows current word after completion restart v9.0.2039
nwounkn [Tue, 17 Oct 2023 09:05:38 +0000 (11:05 +0200)] 
patch 9.0.2039: completion shows current word after completion restart

Problem:  completion shows current word after completion restart
Solution: remove the word being completed after completion restart

The word being completed is shown in a completion list after completion
restart, because it isn't removed from the current buffer before
searching for matches.

Also adjust `Test_complete_add_onechar` to match the new behavior.

closes: #13349

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: nwounkn <nwounkn@gmail.com>
21 months agopatch 9.0.2038: Vim9: object method funcref not cleaned up after use v9.0.2038
Yegappan Lakshmanan [Tue, 17 Oct 2023 09:00:45 +0000 (11:00 +0200)] 
patch 9.0.2038: Vim9: object method funcref not cleaned up after use

Problem:  Vim9: object method funcref not cleaned up after use
Solution: Clean up type stack after using object method funcref,
          remove now longer used ISN_DEFEROBJ instrunction

closes: #13360

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
21 months agopatch 9.0.2037: A few remaining cmdline completion issues with C-E/Y v9.0.2037
Yee Cheng Chin [Tue, 17 Oct 2023 08:56:25 +0000 (10:56 +0200)] 
patch 9.0.2037: A few remaining cmdline completion issues with C-E/Y

Problem:  A few remaining cmdline completion issues with C-E/Y
Solution: Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not
          used at the end

Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end

A few places in the cmdline completion code only works properly when the
user hits Tab (or 'wildchar') at the end of the cmdline, even though
it's supposed to work even in the middle of the line.

For fuzzy search, `:e ++ff`, and `:set hl=`, fix completion code to make
sure to use `xp_pattern_len` instead of assuming the entire `xp_pattern`
is the search pattern (since it contains texts after the cursor).

Fix Ctrl-E / Ctrl-Y to not jump to the end when canceling/accepting a
wildmenu completion. Also, make them work even when not using
`set wildoptions+=pum` as there is no drawback to doing so.
(Related issue where this was brought up: #13331)

closes: #13362

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
21 months agopatch 9.0.2036: if_python: rework python3.12 build dependency v9.0.2036
Yee Cheng Chin [Tue, 17 Oct 2023 08:38:11 +0000 (10:38 +0200)] 
patch 9.0.2036: if_python: rework python3.12 build dependency

Problem:  if_python: rework python3.12 build dependency
          (after 9.0.1996)
Solution: use PyTuple_Size instead of inlining the Py_SIZE
          into the Vim code base

Use a simpler fix for Python 3.12 build issues

Python 3.12 introduced link dependencies to their `Py_SIZE()` inline
function, which #13290 fixed by copying the inline function to Vim's
Python binding code. This works but it's fragile, as a future update may
change the implementation of `Py_SIZE` and there is no way for us to
know.

The reason we need `Py_SIZE` to begin with is that we use
`PyTuple_GET_SIZE()` which calls that. Just fix it by mapping that to
(confusingly similarly named) `PyTuple_Size()`, which we already do in
the stable ABI implementation. There's a minor performance cost in that
it's not inlined and it does error checking but that's fine as we only
call this function rarely (in an error handler).

related: #13290
closes: #13359

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
21 months agopatch 9.0.2035: [security] use-after-free with wildmenu v9.0.2035
Yee Cheng Chin [Tue, 17 Oct 2023 08:06:56 +0000 (10:06 +0200)] 
patch 9.0.2035: [security] use-after-free with wildmenu

Problem:  [security] use-after-free with wildmenu
Solution: properly clean up the wildmenu when exiting

Fix wildchar/wildmenu/pum memory corruption with special wildchar's

Currently, using `wildchar=<Esc>` or `wildchar=<C-\>` can lead to a
memory corruption if using wildmenu+pum, or wrong states if only using
wildmenu. This is due to the code only using one single place inside the
cmdline process loop to perform wild menu clean up (by checking
`end_wildmenu`) but there are other odd situations where the loop could
have exited and we need a post-loop clean up just to be sure. If the
clean up was not done you would have a stale popup menu referring to
invalid memory, or if not using popup menu, incorrect status line (if
`laststatus=0`).

For example, if you hit `<Esc>` two times when it's wildchar, there's a
hard-coded behavior to exit command-line as a failsafe for user, and if
you hit `<C-\><C-\><C-N>` it will also exit command-line, but the clean
up code would not have hit because of specialized `<C-\>` handling.

Fix Ctrl-E / Ctrl-Y to not cancel/accept wildmenu if they are also
used for 'wildchar'/'wildcharm'. Currently they don't behave properly,
and also have potentially memory unsafe behavior as the logic is
currently not accounting for this situation and try to do both.
(Previous patch that addressed this: #11677)

Also, correctly document Escape key behavior (double-hit it to escape)
in wildchar docs as it's previously undocumented.

In addition, block known invalid chars to be set in `wildchar` option,
such as Ctrl-C and `<CR>`. This is just to make it clear to the user
they shouldn't be set, and is not required for this bug fix.

closes: #13361

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
21 months agopatch 9.0.2034: don't try to copy SMACK attribute, when none exist v9.0.2034
Christian Brabandt [Mon, 16 Oct 2023 08:17:13 +0000 (10:17 +0200)] 
patch 9.0.2034: don't try to copy SMACK attribute, when none exist

Problem:  don't try to copy SMACK attribute, when none exist
Solution: return early if SMACK extended attributes do not exist or
          if they are not supported

closes: #1711
closes: #13348

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2033: gcc overflow-warning for f_resolve v9.0.2033
Ken Takata [Mon, 16 Oct 2023 07:57:43 +0000 (09:57 +0200)] 
patch 9.0.2033: gcc overflow-warning for f_resolve

Problem:  gcc overflow-warning for f_resolve
Solution: use pointer p instead of pointer q[-1]

Suppress the following warning:
```
filepath.c: In function ‘f_resolve’:
filepath.c:2162:27: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 2162 |                     q[-1] = NUL;
```

Closes: #13352
closes: #13353

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
21 months agoruntime: Fix more typos (#13354)
Viktor Szépe [Mon, 16 Oct 2023 07:53:37 +0000 (09:53 +0200)] 
runtime: Fix more typos (#13354)

* Fix more typos

* Fix typos in ignored runtime/ directory

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2032: cannot get mouse click pos for tab or virt text v9.0.2032
zeertzjq [Sun, 15 Oct 2023 08:03:30 +0000 (10:03 +0200)] 
patch 9.0.2032: cannot get mouse click pos for tab or virt text

Problem:  Cannot accurately get mouse clicking position when clicking on
          a TAB or with virtual text.
Solution: Add a "coladd" field to getmousepos() result.

closes: #13335

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
21 months agoruntime(doc): correct <PageUp>/<PageDown> behavior in 'wildmenu' (#13336)
zeertzjq [Sun, 15 Oct 2023 08:02:08 +0000 (16:02 +0800)] 
runtime(doc): correct <PageUp>/<PageDown> behavior in 'wildmenu' (#13336)

"but don't insert it" is wrong.
Also move them just below <Up> <Down> as they are more similar.

21 months agopatch 9.0.2031: TextChangedI may be triggered by non-insert mode change v9.0.2031
Evgeni Chasnovski [Sun, 15 Oct 2023 07:59:00 +0000 (09:59 +0200)] 
patch 9.0.2031: TextChangedI may be triggered by non-insert mode change

Problem:  `TextChangedI` can trigger on entering Insert mode if there
          was previously a change not in Insert mode.
Solution: Make it trigger only when text is actually changed in Insert
          mode.

closes: #13265
closes: #13338

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
21 months agopatch 9.0.2030: no max callback recursion limit v9.0.2030
Christian Brabandt [Sun, 15 Oct 2023 07:56:16 +0000 (09:56 +0200)] 
patch 9.0.2030: no max callback recursion limit

Problem:  no max callback recursion limit
Solution: bail out, if max call recursion for callback functions
          has been reached.

This checks the 'maxfuncdepth' setting and throws E169 when a callback
function recursively calls itself.

closes: #13337
closes: #13339

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2029: Vim9: no support for partials using call() v9.0.2029
Yegappan Lakshmanan [Sun, 15 Oct 2023 07:53:41 +0000 (09:53 +0200)] 
patch 9.0.2029: Vim9: no support for partials using call()

Problem:  Vim9: no support for partials using call()
Solution: Add support

closes: #13341

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
21 months agopatch 9.0.2028: confusing build dependencies v9.0.2028
Yee Cheng Chin [Sun, 15 Oct 2023 07:50:53 +0000 (09:50 +0200)] 
patch 9.0.2028: confusing build dependencies

Problem:  confusing build dependencies
Solution: clean them up, make them parallelizable

Separate vim binary and unittest dependencies, make them parallelizable

Clean up make dependencies so Vim and unit test binaries only depend on
the object files they need. This fixes an existing issue where after
running unit tests, the Vim binary would be invalidated, which results
in it having to be linked again when running script tests, even though
Vim was already previously built.

Make link.sh (script we use to link those binaries) generate namespaced
temporary files for each app to avoid them colliding with each other.
This allows `unittesttargets` to be built in parallel.

These fixes are useful when using link-time-optimization as the link
phase could now take minutes rather than a few seconds.

closes: #13344

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
21 months agopatch 9.0.2027: Vim9: no support for bitwise operators in lambda funcs v9.0.2027
Yegappan Lakshmanan [Sun, 15 Oct 2023 07:44:50 +0000 (09:44 +0200)] 
patch 9.0.2027: Vim9: no support for bitwise operators in lambda funcs

Problem:  Vim9: no support for bitwise operators in lambda funcs
Solution: move "evaluate" assignment a bit up in order to decide
          to perform bitwise operations

closes: #13342
closes: #13345

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
21 months agopatch 9.0.2026: win32: python3 dll loading can be improved v9.0.2026
Ken Takata [Sat, 14 Oct 2023 09:49:09 +0000 (11:49 +0200)] 
patch 9.0.2026: win32: python3 dll loading can be improved

Problem:  win32: python3 dll loading can be improved
Solution: Load DLL from registry path

Support loading python3.dll and/or python3xx.dll from the path written
in the registry.  To support Stable ABI's forwarder DLL (python3.dll),
use the `LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR` flag for `LoadLibraryExW()`
because python3xx.dll is placed in the same directory of python3.dll.

If Stable ABI is used, search the latest version from the registry (both
from HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE).  If Stable ABI is not
used, search only the matching version.

closes: #13315

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
21 months agopatch 9.0.2025: no cmdline completion for ++opt args v9.0.2025
Yee Cheng Chin [Sat, 14 Oct 2023 09:46:51 +0000 (11:46 +0200)] 
patch 9.0.2025: no cmdline completion for ++opt args

Problem:  no cmdline completion for ++opt args
Solution: Add cmdline completion for :e ++opt=arg and :terminal
          [++options]

closes: #13319

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
21 months agopatch 9.0.2024: no filetype detection for Debian sources v9.0.2024
James McCoy [Sat, 14 Oct 2023 09:41:34 +0000 (11:41 +0200)] 
patch 9.0.2024: no filetype detection for Debian sources

Problem:  no filetype detection for Debian sources
Solution: Add new deb822sources filetype

closes: #13320

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: James McCoy <jamessan@jamessan.com>
21 months agopatch 9.0.2023: need more tests for :cq v9.0.2023
Christian Brabandt [Sat, 14 Oct 2023 09:38:12 +0000 (11:38 +0200)] 
patch 9.0.2023: need more tests for :cq

Problem:  need more tests for :cq
Solution: Add more tests, including wraparound on linux

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2022: getmousepos() returns wrong index for TAB char v9.0.2022
zeertzjq [Sat, 14 Oct 2023 09:32:28 +0000 (11:32 +0200)] 
patch 9.0.2022: getmousepos() returns wrong index for TAB char

Problem:  When clicking in the middle of a TAB, getmousepos() returns
          the column of the next char instead of the TAB.
Solution: Break out of the loop when the vcol to find is inside current
          char. Fix invalid memory access when calling virtcol2col() on
          an empty line.

closes: #13321

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
21 months agopatch 9.0.2021: Coverity complains about change in charset v9.0.2021
Christian Brabandt [Sat, 14 Oct 2023 09:29:28 +0000 (11:29 +0200)] 
patch 9.0.2021: Coverity complains about change in charset

Problem:  Coverity complains about change in charset (after v9.0.2017)
Solution: check pointer t at index 0

closes: #13322

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agotranslation(sr): Update Serbian messages translation (#13324)
Ivan Pešić [Sat, 14 Oct 2023 09:28:05 +0000 (13:28 +0400)] 
translation(sr): Update Serbian messages translation (#13324)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(tcsh): Update ftplugin (#13327)
dkearns [Sat, 14 Oct 2023 09:27:27 +0000 (20:27 +1100)] 
runtime(tcsh): Update ftplugin (#13327)

Fix b:browsefilter deletion error when calling b:undo_ftplugin.

Fixes #13167

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2020: Vim9: islocked() needs more work v9.0.2020
Ernie Rael [Sat, 14 Oct 2023 09:25:04 +0000 (11:25 +0200)] 
patch 9.0.2020: Vim9: islocked() needs more work

Problem:  Vim9: islocked() needs more work
Solution: rework islocked() and remove sync_root
          from get_lval()

closes: #13329

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
21 months agoruntime(doc): Improve command-line completion docs (#13331)
Yee Cheng Chin [Sat, 14 Oct 2023 09:23:45 +0000 (02:23 -0700)] 
runtime(doc): Improve command-line completion docs (#13331)

* Improve command-line completion docs

Add more details about 'ignorecase' and its effect on cmdline
completion.

Make sure keys used in wildmenu are properly documented and linked in the
keys' documentation entries, and in `:h index` for proper
cross-referencing, as wildmenu popup is slightly different from
insert-mode popup menu.

* Fix docs typos

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.0.2019: Vim9: no support for funcrefs v9.0.2019
Yegappan Lakshmanan [Sat, 14 Oct 2023 09:18:50 +0000 (11:18 +0200)] 
patch 9.0.2019: Vim9: no support for funcrefs

Problem:  Vim9: no support for funcrefs
Solution: Add support for object/class funcref members

closes: #11981 #12417 #12960 #12324 #13333

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.2018: complete_info() returns wrong index v9.0.2018
LemonBoy [Wed, 11 Oct 2023 19:55:56 +0000 (21:55 +0200)] 
patch 9.0.2018: complete_info() returns wrong index

Problem:  complete_info() returns wrong index
Solution: Make order of 'info' in completion_info consistent

Start the iteration from the same point and follow the same direction as
done when assigning the completion numbers. This way we remove the
dependence on the completion direction and make the order of 'info'
consistent.

closes: #12230
closes: #12971

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
22 months agopatch 9.0.2017: linebreak applies for leading whitespace v9.0.2017
Christian Brabandt [Wed, 11 Oct 2023 19:51:19 +0000 (21:51 +0200)] 
patch 9.0.2017: linebreak applies for leading whitespace

Problem:  linebreak applies for leading whitespace
Solution: only apply linebreak, once we have found non-breakat chars in
          the line

closes: #13228
closes: #13243

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2016: Vim9: assignment operators don't work for class vars v9.0.2016
Yegappan Lakshmanan [Wed, 11 Oct 2023 19:43:52 +0000 (21:43 +0200)] 
patch 9.0.2016: Vim9: assignment operators don't work for class vars

Problem:  Vim9: assignment operators don't work for class vars
Solution: implement it

closes: #13306

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.2015: Vim9: does not handle islocked() from a method correctly v9.0.2015
Ernie Rael [Wed, 11 Oct 2023 19:35:11 +0000 (21:35 +0200)] 
patch 9.0.2015: Vim9: does not handle islocked() from a method correctly

Problem:  Vim9: does not handle islocked() from a method correctly
Solution: Handle islocked() builtin from a method.

- Setup `lval_root` from `f_islocked()`.
- Add function `fill_exec_lval_root()` to get info about executing method.
- `sync_root` added in get_lval to handle method member access.
- Conservative approach to reference counting.

closes: #13309

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
22 months agopatch 9.0.2013: confusing ifdefs in if_<lang>.c v9.0.2014
Ken Takata [Wed, 11 Oct 2023 19:27:06 +0000 (21:27 +0200)] 
patch 9.0.2013: confusing ifdefs in if_<lang>.c

Problem:  confusing ifdefs in if_<lang>.c
Solution: refactor ifndefs to #ifdefs

if_x: Avoid using #ifndef - #else - #endif

Using #ifndef - #else - #endif is sometimes confusing.
Use #ifdef - #else - #endif instead.

closes: #13310

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agopatch 9.0.2013: Unicode tables outdated v9.0.2013
Christian Brabandt [Wed, 11 Oct 2023 19:24:49 +0000 (21:24 +0200)] 
patch 9.0.2013: Unicode tables outdated

Problem: Unicode tables outdated
Solution: Update Unicode tables to v15.1 (released 23.09.2023)

closes: #13311

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2012: Vim9: error message can be more accurate v9.0.2012
Ernie Rael [Wed, 11 Oct 2023 19:22:12 +0000 (21:22 +0200)] 
patch 9.0.2012: Vim9: error message can be more accurate

Problem:  Vim9: error message can be more accurate
Solution: Fix the error messages

Fix message for some single use error messages.

closes: #13312

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
22 months agopatch 9.0.2011: INI files not detected v9.0.2011
Martin Tournoij [Wed, 11 Oct 2023 19:20:06 +0000 (21:20 +0200)] 
patch 9.0.2011: INI files not detected

Problem:  INI files not detected
Solution: detect uppercase .INI as dosini files

It previo~1 only worked for lower-case .ini files, but upperc~1 .INI is
also somewhat common on account of DOS' old 8.3 upperc~2 only filena~1.

closes: #13316

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Martin Tournoij <martin@arp242.net>
22 months agopatch 9.0.2010: [security] use-after-free from buf_contents_changed() v9.0.2010
Christian Brabandt [Wed, 11 Oct 2023 19:08:13 +0000 (21:08 +0200)] 
patch 9.0.2010: [security] use-after-free from buf_contents_changed()

Problem:  [security] use-after-free from buf_contents_changed()
Solution: block autocommands

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2009: cmdline-completion for comma-separated options wrong v9.0.2009
Yee Cheng Chin [Mon, 9 Oct 2023 16:12:31 +0000 (18:12 +0200)] 
patch 9.0.2009: cmdline-completion for comma-separated options wrong

Problem:  cmdline-completion for comma-separated options wrong
Solution: Fix command-line expansions for options with filenames with
          commas

Fix command-line expansions for options with filenames with commas

Cmdline expansion for option values that take a comma-separated list
of file names is currently not handling file names with commas as the
commas are not escaped. For such options, the commas in file names need
to be escaped (to differentiate from a comma that delimit the list
items). The escaped comma is unescaped in `copy_option_part()` during
option parsing.

Fix as follows:
- Cmdline completion for option values with comma-separated file/folder
  names will not start a new match when seeing `\\,` and will instead
  consider it as one value.
- File/folder regex matching will strip the `\\` when seeing `\\,` to
  make sure it can match the correct files/folders.
- The expanded value will escape `,` with `\\,`, similar to how spaces
  are escaped to make sure the option value is correct on the cmdline.

This fix also takes into account the fact that Win32 Vim handles file
name escaping differently. Typing '\,' for a file name results in it
being handled literally but in other platforms '\,' is interpreted as a
simple ',' and commas need to be escaped using '\\,' instead.

Also, make sure this new logic only applies to comma-separated options
like 'path'. Non-list options like 'set makeprg=<Tab>' and regular ex
commands like `:edit <Tab>` do not require escaping and will continue to
work.

Also fix up documentation to be clearer. The original docs are slightly
misleading in how it discusses triple slashes for 'tags'.

closes: #13303
related: #13301

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
22 months agopatch 9.0.2008: test: undofile left behind v9.0.2008
Dominique Pellé [Mon, 9 Oct 2023 16:07:24 +0000 (18:07 +0200)] 
patch 9.0.2008: test: undofile left behind

Problem:  test: undofile left behind
Solution: cleanup undofile

fix: tmp file not deleted when running make test_undo

Temporary file `.Xtestfile.txt.un~` was left running `make test_undo`
and vim was configured with:
```
./configure --with-features=normal --enable-gui=no --enable-terminal
```

closes: #13304

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
22 months agopatch 9.0.2007: Vim9: covariant parameter types allowed v9.0.2007
Yegappan Lakshmanan [Mon, 9 Oct 2023 16:01:06 +0000 (18:01 +0200)] 
patch 9.0.2007: Vim9: covariant parameter types allowed

Problem:  Vim9: covariant parameter types allowed when assigning
          functions
Solution: Enforce invariant type check for arguments and return value
          when assigning a funcref

closes: #13299
closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.2006: Vim9: need more tests v9.0.2006
Yegappan Lakshmanan [Mon, 9 Oct 2023 15:57:27 +0000 (17:57 +0200)] 
patch 9.0.2006: Vim9: need more tests

Problem:  Vim9: need more tests
Solution: add additional disassembly tests

closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.2005: partially revert patch v9.0.1997 v9.0.2005
Christian Brabandt [Mon, 9 Oct 2023 15:52:14 +0000 (17:52 +0200)] 
patch 9.0.2005: partially revert patch v9.0.1997

Problem:  partially revert patch v9.0.1997
Solution: add a comment, to make clear it's not used

related: #13288

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2004: Missing test file v9.0.2004
Christian Brabandt [Mon, 9 Oct 2023 06:15:00 +0000 (08:15 +0200)] 
patch 9.0.2004: Missing test file

Problem:  Missing test file
Solution: git-add the file to the repo

closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2003: xxd: compilation warning v9.0.2003
Christian Brabandt [Sun, 8 Oct 2023 18:36:44 +0000 (20:36 +0200)] 
patch 9.0.2003: xxd: compilation warning

Problem:  xxd: compilation warning
Solution: initialize variables

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime: make command name for &iskeywordprg more unique (#13297)
Enno [Sun, 8 Oct 2023 17:14:07 +0000 (19:14 +0200)] 
runtime: make command name for &iskeywordprg more unique (#13297)

See https://github.com/vim/vim/pull/13213/commits by @dkearns:
Rename 'keywordprg' user command to ShKeywordPrg as this is just a
leaking implementation detail.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2002: Vim9: need cleanup of class related interface code v9.0.2002
Yegappan Lakshmanan [Sun, 8 Oct 2023 17:07:39 +0000 (19:07 +0200)] 
patch 9.0.2002: Vim9: need cleanup of class related interface code

Problem:  Vim9: need cleanup of class related interface code
Solution: Remove the unused class variable and class method related code
          for interfaces.

Remove unused class variable and class method related code for
interfaces.

Refactor the code.

Optimize the object/class member double lookup in compile_lhs().

Change unused global functions to static functions.

closes: #13302

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agotranslation(it): updated translation of xxd manpage
Antonio Giovanni Colombo [Sun, 8 Oct 2023 17:04:21 +0000 (19:04 +0200)] 
translation(it): updated translation of xxd manpage

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2001: Vim9: segfault with islocked() v9.0.2001
Ernie Rael [Sat, 7 Oct 2023 20:05:40 +0000 (22:05 +0200)] 
patch 9.0.2001: Vim9: segfault with islocked()

Problem:  Vim9: segfault with islocked()
Solution: Check that the lval pointer is not null for objects and
          class variables

closes: #13295

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
22 months agopatch 9.0.2000: Vim9: use-after-free in deep call stack v9.0.2000
Yegappan Lakshmanan [Sat, 7 Oct 2023 20:03:18 +0000 (22:03 +0200)] 
patch 9.0.2000: Vim9: use-after-free in deep call stack

Problem:  Vim9: use-after-free in deep call stack
Solution: Get the objct pointer from execution stack

closes: #13296

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agoruntime(sh): Update ftplugin (#13213)
dkearns [Fri, 6 Oct 2023 17:59:42 +0000 (04:59 +1100)] 
runtime(sh): Update ftplugin (#13213)

Rename 'keywordprg' user command to ShKeywordPrg as this is just a
leaking implementation detail.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1999: Vim9: some error messages can be improved v9.0.1999
Ernie Rael [Fri, 6 Oct 2023 17:55:52 +0000 (19:55 +0200)] 
patch 9.0.1999: Vim9: some error messages can be improved

Problem:  Vim9: some error messages can be improved
Solution: Mention the defining class for variable access error message

closes: #13272

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: Ernie Rael <errael@raelity.com>
22 months agopatch 9.0.1998: xxd: cannot reverse a bit dump v9.0.1998
tristhaus [Fri, 6 Oct 2023 17:51:13 +0000 (19:51 +0200)] 
patch 9.0.1998: xxd: cannot reverse a bit dump

Problem:  xxd: cannot reverse a bit dump
Solution: implement reversing the bit dump using -b -r

closes: #13286

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: tristhaus <tristhaus@yahoo.de>
22 months agopatch 9.0.1997: Some unused code in move.c and string.c v9.0.1997
dundargoc [Fri, 6 Oct 2023 17:41:14 +0000 (19:41 +0200)] 
patch 9.0.1997: Some unused code in move.c and string.c

Problem:  Some unused code in move.c and string.c
Solution: Remove it

closes: #13288

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
22 months agoruntime(doc): remove E1520 tag (#13289)
zeertzjq [Fri, 6 Oct 2023 17:34:04 +0000 (01:34 +0800)] 
runtime(doc): remove E1520 tag (#13289)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1996: Cannot build with python312 v9.0.1996
Ken Takata [Fri, 6 Oct 2023 17:27:13 +0000 (19:27 +0200)] 
patch 9.0.1996: Cannot build with python312

Problem:  Cannot build with python312
Solution: Define wrapper types and functions for python 3.12

Py_SIZE() uses PyLong_Type and PyBool_Type starting from Python 3.12.
We need to define our own Py_SIZE() to replace Py{Bool,Long}_Type with
py3_Py{Bool,Long}_Type.
We also need to redefine PyTuple_GET_SIZE() and PyList_GET_SIZE(), because
they use Py_SIZE().

closes: #13281
closes: #13290

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agoruntime(doc): Update vim9class help (#13292)
Yegappan Lakshmanan [Fri, 6 Oct 2023 17:24:10 +0000 (10:24 -0700)] 
runtime(doc): Update vim9class help (#13292)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1995: Invalid memory access with empty 'foldexpr' v9.0.1995
zeertzjq [Fri, 6 Oct 2023 17:16:36 +0000 (19:16 +0200)] 
patch 9.0.1995: Invalid memory access with empty 'foldexpr'

Problem:  Invalid memory access when 'foldexpr' returns empty string.
Solution: Check for NUL.

closes: #13293

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1994: inconsistent feature description v9.0.1994
RestorerZ [Thu, 5 Oct 2023 20:25:12 +0000 (22:25 +0200)] 
patch 9.0.1994: inconsistent feature description

Problem:  inconsistent feature description
Solution: delete old mentioned feature sets small and big

The may however still be mentioned for historical reasons. e.g. The
last Amiga built version is for Vim6.2 and is still a big version.

closes: #13273

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
22 months agopatch 9.0.1993: warning about unused function definition v9.0.1993
Christian Brabandt [Thu, 5 Oct 2023 20:17:09 +0000 (22:17 +0200)] 
patch 9.0.1993: warning about unused function definition

Problem:  warning about unused function definition
Solution: add ifdefs

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1992: [security] segfault in exmode v9.0.1992
Christian Brabandt [Thu, 5 Oct 2023 20:08:30 +0000 (22:08 +0200)] 
patch 9.0.1992: [security] segfault in exmode

Problem:  segfault in exmode when redrawing
Solution: skip gui_scroll when exmode_active

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1991: no cmdline completion for setting the font v9.0.1991
Yee Cheng Chin [Thu, 5 Oct 2023 18:54:21 +0000 (20:54 +0200)] 
patch 9.0.1991: no cmdline completion for setting the font

Problem:  no cmdline completion for setting the font
Solution: enable it on Win32 and GTK builds

Add guifont cmdline completion (for Windows and GTK)

For Windows, auto-complete will only suggest monospace fonts as that's
the only types allowed. Will also suggest font options after the colon,
including suggesting the current font size for convenience, and misc
charset and quality options like `cANSI` and `qCLEARTYPE`.

For GTK, auto-complete will suggest only monospace fonts for `guifont`
but will include all fonts for `guifontwide`. The completion code
doesn't currently suggest the current font size, as the GTK guifont
format does not have a clear delimiter (':' for other platforms).

closes: #13264

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
22 months agopatch 9.0.1990: strange error number v9.0.1990
Christ van Willegen [Thu, 5 Oct 2023 18:48:36 +0000 (20:48 +0200)] 
patch 9.0.1990: strange error number

Problem:  strange error number
Solution: change error number,
          add doc tag for E1507

closes: #13270

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
22 months agoruntime(netrw): diff (`df`) may open the wrong window (#13275)
KSR-Yasuda [Thu, 5 Oct 2023 18:37:15 +0000 (03:37 +0900)] 
runtime(netrw): diff (`df`) may open the wrong window (#13275)

closes: #11359

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(netrw): Update `.netrwbook` immediately on bookmark change (#13276)
KSR-Yasuda [Thu, 5 Oct 2023 18:34:17 +0000 (03:34 +0900)] 
runtime(netrw): Update `.netrwbook` immediately on bookmark change (#13276)

closes: #9738

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agotranslation(it): revert permission changes for xxd manpages again (#13277)
K.Takata [Thu, 5 Oct 2023 18:30:08 +0000 (03:30 +0900)] 
translation(it): revert permission changes for xxd manpages again (#13277)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1989: Vim9: double error message given v9.0.1989
Ernie Rael [Thu, 5 Oct 2023 18:28:16 +0000 (20:28 +0200)] 
patch 9.0.1989: Vim9: double error message given

Problem:  Vim9: double error message given
Solution: Only give second error message, if ther
          wasn't one given before

closes: #13278

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
22 months agopatch 9.0.1988: Vim9: potential use-after-free for class members v9.0.1988
Yegappan Lakshmanan [Thu, 5 Oct 2023 18:24:18 +0000 (20:24 +0200)] 
patch 9.0.1988: Vim9: potential use-after-free for class members

Problem:  Vim9: potential use-after-free for class members
Solution: Use the class-related grow array for storing the
          member type instead of using a temporary type
          list grow array

Use the type list grow array associated with the class than using a
temporary type list grow array to allocate the class member type.

For simple types, a predefined type is used. For complex types, the type
is dynamically allocated from a grow array. For class variables, the
type grow array in the class should be used. So that the lifetime of the
type is same as the lifetime of the class.

closes: #13279

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.1987: win32: font-size calculation can be improved v9.0.1987
Ken Takata [Thu, 5 Oct 2023 18:20:58 +0000 (20:20 +0200)] 
patch 9.0.1987: win32: font-size calculation can be improved

Problem:  win32: font-size calculation can be improved
Solution: calculate font size before the window size

Support calculating the new size even if a bitmap font is used.
Calculate the new font size before actually change the Window size.

closes: #13280
related: #11812, #13252

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agotranslation(sr): Update Serbian messages translation (#13282)
Ivan Pešić [Thu, 5 Oct 2023 18:17:28 +0000 (22:17 +0400)] 
translation(sr): Update Serbian messages translation (#13282)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1986: Vim9: accepting type-annotations v9.0.1986
Yegappan Lakshmanan [Thu, 5 Oct 2023 18:14:43 +0000 (20:14 +0200)] 
patch 9.0.1986: Vim9: accepting type-annotations

Problem:  Vim9: accepting type-annotations
Solution: Reject type annotations outside of declarations.

closes: #13267
closes: #13283

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agoruntime(just): Correct filetype detection pattern and style (#13284)
dundargoc [Thu, 5 Oct 2023 18:11:55 +0000 (20:11 +0200)] 
runtime(just): Correct filetype detection pattern and style (#13284)

See https://github.com/vim/vim/pull/13271#discussion_r1347279686 and
https://github.com/NoahTheDuke/vim-just/blob/main/ftdetect/just.vim.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1985: CI: codecov is intrusive v9.0.1985
dundargoc [Thu, 5 Oct 2023 18:07:11 +0000 (20:07 +0200)] 
patch 9.0.1985: CI: codecov is intrusive

Problem:  CI: codecov is intrusive
Solution: disable codecov comments

The codecov report is incredibly intrusive, and getting a notification
for every PR to vim that codecov codecoved is annoying. If anyone is
interested in the report the information is readily available by
clicking on the job.

closes: #13285

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
22 months agopatch 9.0.1984: CI: Test_open_delay*() fails on FreeBSD 14 v9.0.1984
Christian Brabandt [Wed, 4 Oct 2023 19:58:24 +0000 (21:58 +0200)] 
patch 9.0.1984: CI: Test_open_delay*() fails on FreeBSD 14

Problem:  CI: Test_open_delay*() fails on FreeBSD 14
Solution: Skip it on BSD

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1983: scrolling inactive window not possible with cursorbind v9.0.1983
zeertzjq [Wed, 4 Oct 2023 19:45:33 +0000 (21:45 +0200)] 
patch 9.0.1983: scrolling inactive window not possible with cursorbind

Problem:  Scrolling non-current window using mouse is inconsistent
          depending on 'scrollbind'/'scrolloff' and different from GUI
          vertical scrollbar when 'cursorbind' is set.
Solution: Don't move cursor in non-current windows for 'cursorbind' if
          cursor in the current window didn't move.

closes: #13219
closes: #13210

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agoruntime(netrw): error when trying to :bd unloaded buffer
yasuda [Wed, 4 Oct 2023 18:50:35 +0000 (20:50 +0200)] 
runtime(netrw): error when trying to :bd unloaded buffer

closes: #13215
closes: #13082

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1982: vim9: clean up from v9.0.1955 v9.0.1982
Ernie Rael [Wed, 4 Oct 2023 18:16:22 +0000 (20:16 +0200)] 
patch 9.0.1982: vim9: clean up from v9.0.1955

Problem:  vim9: clean up from v9.0.1955
Solution: Fix a few remaining issues, improve error message

- Use `cl_exec`, the executing class, to check permissions in `get_lval()`.
- Handle lockvar of script variable from class.
- Add 'in class "Xxx"' to e_cannot_access_private_variable_str.

closes: #13222

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
22 months agopatch 9.0.1981: not being able to scroll up in diff mode v9.0.1981
zeertzjq [Wed, 4 Oct 2023 18:12:37 +0000 (20:12 +0200)] 
patch 9.0.1981: not being able to scroll up in diff mode

Problem:  Cannot scroll up in diff mode with many filler lines and zero
          'scrolloff'.
Solution: Invalidate w_cline_row before calling comp_botline().

closes: #13256

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1980: win32: issues with stable python ABI v9.0.1980
Ken Takata [Wed, 4 Oct 2023 18:05:05 +0000 (20:05 +0200)] 
patch 9.0.1980: win32: issues with stable python ABI

Problem:  win32: issues with stable python ABI
Solution: if_python3,win32: Fix Python3 stable ABI

There were some issues in current stable ABI implementation on Windows:
* Python DLL name should be `python3.dll` instead of `python311.dll` and
  so on. (See: https://docs.python.org/3/c-api/stable.html)
* Some non-stable API functions were used:
  - `_PyObject_NextNotImplemented`
  - `PyStdPrinter_Type`
* `reset_stdin()` and `hook_py_exit()` didn't work with `python3.dll`.
  `python3.dll` is a special type of DLL called forwarder DLL.
  It just forwards the functions to other DLL (e.g. `python311.dll`).
  There were two issues regarding these functions:
  - `python3.dll` doesn't have import tables. This caused a crash in
    `get_imported_func_info()`. Add a check whether the specified DLL
    has an import table.
  - `reset_stdin()` and `hook_py_exit()` should be applied to the
    forwarded DLL (e.g. `python311.dll`), not to `python3.dll`.
    Check the export directory of `python3.dll` to find the forwarded
    DLL and apply the functions to it.

closes: #13260

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agopatch 9.0.1979: Cirrus CI disabled v9.0.1979
zeertzjq [Wed, 4 Oct 2023 17:57:35 +0000 (19:57 +0200)] 
patch 9.0.1979: Cirrus CI disabled

Problem:  Cirrus CI disabled
Solution: re-enable Cirrus CI

Ref patch 9.0.1912:

> 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.

Actually enabling testing should be fine. In the last month there were
three Cirrus CI jobs and credits ran out on Sep 15, but now there is
only one Cirrus CI job, so credits shouldn't run out.

closes: #13261

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1978: No filetype detection for just files v9.0.1978
dundargoc [Wed, 4 Oct 2023 17:52:54 +0000 (19:52 +0200)] 
patch 9.0.1978: No filetype detection for just files

Problem:  No filetype detection for just files
Solution: Detect just files (*.just, justfile, etc)

closes: #13271

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
22 months agopatch 9.0.1977: Vim9: object members can change type v9.0.1977
Yegappan Lakshmanan [Wed, 4 Oct 2023 17:47:52 +0000 (19:47 +0200)] 
patch 9.0.1977: Vim9: object members can change type

Problem:  Vim9: object members can change type
Solution: Check type during assignment to object/class var

closes: #13127
closes: #13262

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agotranslation(it): update translation of xxd manpage
Antonio Giovanni Colombo [Wed, 4 Oct 2023 16:29:35 +0000 (18:29 +0200)] 
translation(it): update translation of xxd manpage

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