patch 9.1.0707: [security]: invalid cursor position may cause a crash
Problem: [security]: invalid cursor position may cause a crash
(after v9.1.0038)
Solution: Set cursor to the last character in a line, if it would
otherwise point to beyond the line; no tests added, as it
is unclear how to reproduce this.
James McCoy [Sat, 31 Aug 2024 15:10:26 +0000 (17:10 +0200)]
patch 9.1.0706: tests: test_gettext fails when using shadow dir
Problem: tests: test_gettext fails when using shadow dir
Solution: Link the ru_RU directory into the shadow testdir
(James McCoy)
Link the ru_RU directory into shadow testdir
When the ru_RU locale is present, but the build is using a shadowdir,
then test_gettext_cp1251.vim and test_gettext_utf8.vim fail:
From test_gettext_cp1251.vim:
Executed Test_gettext() in 0.000848 seconds
Executed 1 test in 0.007010 seconds
1 FAILED:
Found errors in Test_gettext():
command line..script /home/runner/work/vim/vim/src/shadow/testdir/runtest.vim[607]..function RunTheTest[57]..Test_gettext line 9: Expected '������: ' but got 'ERROR: '
From test_gettext_utf8.vim:
Executed Test_gettext() in 0.000908 seconds
Executed 1 test in 0.007339 seconds
1 FAILED:
Found errors in Test_gettext():
command line..script /home/runner/work/vim/vim/src/shadow/testdir/runtest.vim[607]..function RunTheTest[57]..Test_gettext line 9: Expected '������: ' but got 'ERROR: '
This is because it's unable to load the translations from the ru_RU test
directory, since it wasn't symlinked into the shadow directory.
closes: #15591
Signed-off-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0703: crash with 2byte encoding and glob2regpat()
Problem: possible crash with 2-byte encoding and glob2regpat()
(after v9.1.0700, v9.1.0702)
Solution: include both bytes for a multi-byte character for an
escaped character
patch 9.1.0701: crash with NFA regex engine when searching for composing chars
Problem: crash with NFA regex engine when searching for composing chars
(SuyueGuo)
Solution: When there is no composing character, break out of the loop
and check that out1 state is not null
Aliaksei Budavei [Tue, 27 Aug 2024 20:32:13 +0000 (22:32 +0200)]
runtime(java): Provide support for syntax preview features
Introduce a new API variable "g:java_syntax_previews" whose
value must be a list of syntax preview feature numbers.
Enumerate the currently supported numbers in a table at the
end of the documentation entry for "ft-java-syntax".
Also, disable the recognition of String Templates. Despite
the withdrawal of this preview feature in its proposed form
from the upcoming JDK 23 release and the fact that the JDK
22 release is coming to EOL this September, an earlier
iteration of this preview feature was included in JDK 21
(LTS) whose EOL is projected to fall due in late 2028 and,
therefore, retain the current implementation.
Define "g:java_syntax_previews" and include number 430 in
its list to enable the recognition of String Templates:
------------------------------------------------------------
let g:java_syntax_previews = [430]
------------------------------------------------------------
zeertzjq [Mon, 26 Aug 2024 16:45:37 +0000 (18:45 +0200)]
patch 9.1.0698: tests: "Untitled" file not removed when running Test_crash1_3 alone
Problem: tests: "Untitled" file not removed when running Test_crash1_3 alone
with TEST_FILTER (after v9.1.0695)
Solution: Use a TearDown function instead of another test.
(zeertzjq)
closes: #15578
closes: #15577
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
James McCoy [Sun, 25 Aug 2024 18:22:11 +0000 (20:22 +0200)]
patch 9.1.0696: installing runtime files fails when using SHADOWDIR
Problem: installing runtime files fails when using SHADOWDIR
Solution: revert part of v9.1.0609, since runtime/doc/Makefile's default
value for VIMPROG does not work if vim was built in a SHADOWDIR.
(James McCoy)
closes: #15575
Signed-off-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0691: python3: stable-abi may cause segfault on Python 3.11
Problem: python3: stable-abi may cause segfault on Python 3.11
(Audrius Kažukauskas, after v9.1.0668)
Solution: do not enable the stable Python ABI by default, only when used
with --with-python3-stable-abi argument is given
translation(pt): Revert and fix wrong Portuguese menu translation files
In #14674, the Brazilian and Portuguese localization files were
erroneously combined, even though those are separate locales. This
reverts that change, but maintains some of the original typo fixes in
it.
closes: #15557
related: #14674
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0689: [security]: buffer-overflow in do_search() with 'rightleft'
Problem: buffer-overflow in do_search() with 'rightleft'
(SuyueGuo)
Solution: after reversing the text (which allocates a new buffer),
re-calculate the text length
Ken Takata [Thu, 22 Aug 2024 19:29:39 +0000 (21:29 +0200)]
runtime(vim): Improve heredoc handling for all embedded scripts
* Improve heredoc handling
- Support "trim" for all the embedded scripts.
- Check the indent of "trim" for "let" and all the embedded scripts.
* Update missing part of vim.vim.base in the commit d164f2a521f8e52e587727657fb1c19e9a25f32a.
* Update gen_syntax_vim.vim to catch up with 9.1.0685's source code.
patch 9.1.0687: Makefile may not install desktop files
Problem: Makefile may not install desktop files
Solution: Check for "$(DESTDIR)$(DATADIR)" instead of just "$DESTDIR",
which is usually not defined, add uninstall rules for the
icons and the desktop files
Luca Saccarola [Thu, 22 Aug 2024 19:16:25 +0000 (21:16 +0200)]
runtime(man): Fix <Plug>ManBS
This change does 2 things:
- make sure the mapping <Plug>ManBS sets the buffer to modified
to avoid a potential error message
- remove commented q mapping
fixes #15538
closes: #15547
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aliaksei Budavei [Thu, 22 Aug 2024 19:09:32 +0000 (21:09 +0200)]
runtime(java): Make the bundled &foldtext function optional
- Obtain and pass through translated messages with this
function.
- If "g:java_foldtext_show_first_or_second_line" is defined,
assign this function to &foldtext.
closes: #15549
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0686: zip-plugin has problems with special characters
Problem: zip-plugin has problems with special characters
(user202729)
Solution: escape '*?[\' on Unix and handle those chars
a bit differently on MS-Windows, add a test, check
before overwriting files
runtime(zip): small fixes for zip plugin
This does the following:
- verify the unzip plugin is executable when loading the autoload plugin
- handle extracting file names with '[*?\' in its name correctly by
escaping those characters for the unzip command (and handle those
characters a bit differently on MS-Windows, since the quoting is different)
- verify, that the extract plugin is not overwriting a file (could cause
a hang, because unzip asking for confirmation)
- add a test zip file which contains those special file names
kuuote [Tue, 20 Aug 2024 17:53:17 +0000 (19:53 +0200)]
patch 9.1.0683: mode() returns wrong value with <Cmd> mapping
Problem: mode() returns wrong value with <Cmd> mapping
Solution: Change decision priority of VIsual_active and move
visual mode a bit further down (kuuote)
closes: #15533
Signed-off-by: kuuote <znmxodq1@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aliaksei Budavei [Mon, 19 Aug 2024 19:33:26 +0000 (21:33 +0200)]
patch 9.1.0681: tests: Analyzing failed screendumps is hard
Problem: tests: Analyzing failed screendumps is hard
Solution: Facilitate the viewing of rendered screendumps under src/
add some documentation on how to use the viewdumps.vim
script (Aliaksei Budavei)
With the submitted "viewdumps.vim" script, a few manual
steps in typical workflows (see below) can be automated.
The updated "README.txt" contains additional information.
Reviewing LOCAL failed screendump tests can be arranged as
follows:
1) Run tests and generate screendumps:
------------------------------------------------------------
cd /path/to/fork/src/testdir
make
------------------------------------------------------------
2) Examine the screendumps from the "failed" directory:
------------------------------------------------------------
../vim -u NONE -S viewdumps.vim
------------------------------------------------------------
3) Set up the "dumps" directory. Create a symlink to
"/path/to/fork/dirs/dumps" in the extracted directories so
that term_dumpdiff() can be used. (The lookup algorithm
resolves "dumps" for every loaded filename. So, with
"/tmp/src/testdir/failed/*.dump" files passed as script
arguments, the algorithm will make the files in
"/tmp/src/testdir/dumps" queried.)
------------------------------------------------------------
cd /path/to/fork
ln -s $(pwd)/src/testdir/dumps /tmp/src/testdir/dumps
------------------------------------------------------------
Reviewing SUBMITTED FOR PULL REQUEST screendump tests can be
arranged as follows (it can be further locally scripted):
1) List the fetched changeset and write the changed "dumps"
filenames to "/tmp/filelist":
------------------------------------------------------------
cd /path/to/fork
git switch prs/1234
git diff-index --relative=src/testdir/dumps/ \
--name-only prs/1234~1 > /tmp/filelist
------------------------------------------------------------
2) Reconcile relative filepaths, and copy next-to-be-updated
"dumps" files in the "failed" directory (note the missing
new screendumps, if any):
------------------------------------------------------------
git switch master
cd src/testdir/dumps
test -d ../failed || mkdir ../failed
cp -t ../failed $(cat /tmp/filelist)
------------------------------------------------------------
3) Remember about the introduced INVERTED relation between
"dumps" and "failed", i.e. the files to be committed are in
"dumps" already and their previous versions are in "failed";
therefore, copy the missing new screendumps from "dumps" to
"failed" (otherwise these won't be shown):
------------------------------------------------------------
git switch prs/1234
cp -t ../failed foo_10.dump foo_11.dump foo_12.dump
------------------------------------------------------------
4) Examine the screendumps from the "failed" directory (new
screendumps will be shown with no difference between their
versions):
------------------------------------------------------------
cd ..
../vim -u NONE -S viewdumps.vim
------------------------------------------------------------
closes: #15515
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Otherwise, if the executable to be verified does not exist,
this would cause a false-positive in the 'IsSafeExecutable()' check,
because 'exepath(executable)' returns an empty string and
'fnamemodify('', ':p:h')' returns the current directory and as a result
the 'IsSafeExecutable()' returns false (for the wrong reason).
zeertzjq [Fri, 16 Aug 2024 19:11:31 +0000 (21:11 +0200)]
patch 9.1.0679: Rename from w_closing to w_locked is incomplete
Problem: Rename from w_closing to w_locked is incomplete
(after 9.1.0678).
Solution: Rename remaining occurrences of w_closing to w_locked and
update comments (zeertzjq).
closes: #15504
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Maxim Kim [Fri, 16 Aug 2024 19:09:50 +0000 (21:09 +0200)]
runtime(colors): update colorschemes
- all: PMenuMatch and PMenuMatchSel for 8c/16c
- habamax:
- revert VertSplit to solid background color
- remove gitCommitSummary link to Title
- make TabLineFill same as StatuslineNC
closes: #15506
Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
The end marker must appear on line of its own without any trailing
whitespace.
Whitespace is incorrectly allowed before all end markers. Limiting this
only to heredocs where "trim" was specified, and with the correct
indent, is currently an intractable problem given that contained syntax
groups (in this case :let) cannot be limited to start patterns.
Highlight interpolated expressions when "eval" is specified.
cloess: #15511
Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(yaml): do not re-indent when commenting out lines
It's a personal annoyance for me. I have to edit yaml files on a lot of
customer environments and whenever you type '#' at the start of the
line, the commented line will be indented by whatever indent the
previous line had.
I hate this seriously, because it makes un-commenting painful. So let's
fix this. But instead of messing with the indent function, let's just
remove the '0#' from cinkeys, so that Vim won't perform re-indenting
when commenting out such a yaml file.
patch 9.1.0678: [security]: use-after-free in alist_add()
Problem: [security]: use-after-free in alist_add()
(SuyueGuo)
Solution: Lock the current window, so that the reference to
the argument list remains valid.
Gregory Anders [Thu, 15 Aug 2024 20:04:22 +0000 (22:04 +0200)]
patch 9.1.0677: :keepp does not retain the substitute pattern
Problem: :keeppatterns does not retain the substitute pattern
for a :s command
Solution: preserve the last substitute pattern when used with the
:keeppatterns command modifier (Gregory Anders)
closes: #15497
Signed-off-by: Gregory Anders <greg@gpanders.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Ken Takata [Wed, 14 Aug 2024 19:56:42 +0000 (21:56 +0200)]
runtime(dosbatch): Add syn-sync to syntax file
Closing parentheses were often highlighted as errors.
Add a syntax sync command to reduce the error.
Also fix that `defined` was not highlighted as an operator inside
parentheses. E.g.:
```
if defined foo (
if defined bar (
...
)
)
```
The first `defined` was highlighted but the second one was not.
related: #15453
Signed-off-by: Ken Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
Yinzuo Jiang [Wed, 14 Aug 2024 19:49:00 +0000 (21:49 +0200)]
runtime(sql, mysql): fix E169: Command too recursive with sql_type_default = "mysql"
Problem: When setting "let g:sql_type_default = "mysql", editing .sql
file reports "E169: Command too recursive" error
Solution:
- Add 'let b:did_ftplugin = 1' at the top of ftplugin/sql.vim
- Add 'if exists("b:did_ftplugin") | finish | endif' in ftplugin/mysql.vim
- Add missing header information in ftplugin/mysql.vim
- Remove redundant code in ftplugin/sql.vim
Ernie Rael [Wed, 14 Aug 2024 12:53:55 +0000 (14:53 +0200)]
patch 9.1.0674: Vim9: compiling abstract method fails because of missing return
Problem: Vim9: compiling abstract method fails because of missing
return (Aliaksei Budavei)
Solution: don't require a return statement for an abstract method when
compiling (Ernie Rael)
fixes: #15432
closes: #15441
Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Ernie Rael [Tue, 13 Aug 2024 21:27:22 +0000 (23:27 +0200)]
patch 9.1.0673: Vim9: too recursive func calls when calling super-class method
Problem: Vim9: too recursive func calls when calling super-class method
with non-overriden super-call methods. (Aliaksei Budavei)
Solution: use interface method, when super is to be used (Ernie Rael)
When compiling "super.Func()" force class context to class that defines
function that is doing "super.Func()".
ISN_METHODCALL arg "cmf_is_super" for specific ufunc.
fixes: #15448
fixes: #15463 (2) super.method may not execute in context of defining
class
closes: #15477
Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aliaksei Budavei [Mon, 12 Aug 2024 16:37:15 +0000 (18:37 +0200)]
runtime(syntax-tests): Facilitate the viewing of rendered screendumps
With the submitted "viewdumps.vim" script, a few manual
steps in typical workflows (see below) can be automated.
The updated "README.txt" contains additional information.
Reviewing LOCAL failed syntax tests can be arranged as
follows:
1) Run tests and generate screendumps:
------------------------------------------------------------
cd /path/to/fork/runtime/syntax
make clean test
------------------------------------------------------------
2) Examine the screendumps from the "failed" directory:
------------------------------------------------------------
../../src/vim --clean -S testdir/viewdumps.vim
------------------------------------------------------------
3) Set up the "dumps" directory. Create a symlink to
"/path/to/fork/dirs/dumps" in the extracted directories so
that term_dumpdiff() can be used. (The lookup algorithm
resolves "dumps" for every loaded filename. So, with
"/tmp/runtime/syntax/testdir/failed/*.dump" files passed
as script arguments, the algorithm will make the files in
"/tmp/runtime/syntax/testdir/dumps" queried.)
------------------------------------------------------------
cd /path/to/fork
ln -s $(pwd)/runtime/syntax/testdir/dumps \
/tmp/runtime/syntax/testdir/dumps
------------------------------------------------------------
Reviewing SUBMITTED FOR PULL REQUEST syntax tests can be
arranged as follows (it can be further locally scripted):
1) List the fetched changeset and write the changed "dumps"
filenames to "/tmp/filelist":
------------------------------------------------------------
cd /path/to/fork
git switch prs/1234
git diff-index --relative=runtime/syntax/testdir/dumps/ \
--name-only prs/1234~1 > /tmp/filelist
------------------------------------------------------------
2) Reconcile relative filepaths, and copy next-to-be-updated
"dumps" files in the "failed" directory (note the missing
new screendumps, if any):
------------------------------------------------------------
git switch master
cd runtime/syntax/testdir/dumps
cp -t ../failed $(cat /tmp/filelist)
------------------------------------------------------------
3) Remember about the introduced INVERTED relation between
"dumps" and "failed", i.e. the files to be committed are in
"dumps" already and their previous versions are in "failed";
therefore, copy the missing new screendumps from "dumps" to
"failed" (otherwise these won't be shown):
------------------------------------------------------------
git switch prs/1234
cp -t ../failed foo_10.dump foo_11.dump foo_12.dump
------------------------------------------------------------
4) Examine the screendumps from the "failed" directory (new
screendumps will be shown with no difference between their
versions):
------------------------------------------------------------
cd ..
../../../src/vim --clean -S viewdumps.vim
------------------------------------------------------------
closes: #15476
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0672: marker folds may get corrupted on undo
Problem: marker folds may get corrupted on undo (Yousef Mohammed)
Solution: when adjusting folds, make sure that line1 is the lower limit
and line2 is the upper line limit. In particular, line2 should
not be able to get smaller than line1.
RestorerZ [Sun, 11 Aug 2024 18:03:35 +0000 (20:03 +0200)]
patch 9.1.0670: po file encoding fails on *BSD during make
Problem: po file encoding fails on *BSD during make
Solution: instead of using `$<` make use of variable `$?` which should
be equivalent when the rule is dependent on only a single
file (RestorerZ).
closes: #15471
Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
Ken Takata [Sun, 11 Aug 2024 16:41:41 +0000 (18:41 +0200)]
patch 9.1.0669: if_python: stable python ABI not used by default
Problem: stable python ABI not used by default
Solution: Enable stable python ABI v3.8 when building with python3/dyn
by default, update the default Python3 version to 3.8 for
MS-Windows (Ken Takata)
closes: #15470
related: #15457
Signed-off-by: Ken Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>