]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
11 months agoruntime(dosbatch): Add syn-sync to syntax file
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>
11 months agoruntime(sql, mysql): fix E169: Command too recursive with sql_type_default = "mysql"
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

fixes: #15474
closes: #15475

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0674: Vim9: compiling abstract method fails because of missing return v9.1.0674
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>
11 months agoruntime(javascript): fix a few issues with syntax higlighting
Tobiasz Laskowski [Wed, 14 Aug 2024 12:50:56 +0000 (14:50 +0200)] 
runtime(javascript): fix a few issues with syntax higlighting

It addresses the following issues:

- Fix highlight of let and var javascript keywords

  According to runtime/doc/syntax.txt, Identifier is for variable names.
  let/var are not variable names, they are keywords

- Add highlighting for "from" keyword in javascript

- Fix highlight of function keyword in javascript

  According to docs, Function is for function names, so the function
  keyword should just be Keyword.

- Fix highlight of static keyword in javascript

  According to vim docs: StorageClass static, register, volatile, etc.

closes: #15480

Signed-off-by: Tobiasz Laskowski <tobil4sk@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(mediawiki): fix typo in doc, test for b:did_ftplugin var
Stanislav Asunkin [Wed, 14 Aug 2024 12:43:30 +0000 (14:43 +0200)] 
runtime(mediawiki): fix typo in doc, test for b:did_ftplugin var

closes: #15479

Signed-off-by: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com>
Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(termdebug): Fix wrong test for balloon feature
Ubaldo Tiberi [Wed, 14 Aug 2024 12:41:02 +0000 (14:41 +0200)] 
runtime(termdebug): Fix wrong test for balloon feature

fixes: #15359
closes: #15487

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(doc): Remove mentioning of the voting feature
RestorerZ [Wed, 14 Aug 2024 12:38:46 +0000 (14:38 +0200)] 
runtime(doc): Remove mentioning of the voting feature

closes: #15491

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(doc): add help tags for json + markdown global variables
JJCUBER [Tue, 13 Aug 2024 21:42:36 +0000 (23:42 +0200)] 
runtime(doc): add help tags for json + markdown global variables

I added help tags for them in the syntax.txt file since this is the only
place they are mentioned.

closes: #15486

Signed-off-by: JJCUBER <34446698+JJCUBER@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0673: Vim9: too recursive func calls when calling super-class method v9.1.0673
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>
11 months agoruntime(syntax-tests): Facilitate the viewing of rendered screendumps
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
------------------------------------------------------------

============================================================

Reviewing UPLOADED failed syntax tests can be arranged as
follows (it can be further locally scripted):

1) Fetch an artifact with failed screendumps from
"github.com/vim/vim/actions/runs/A_ID/artifacts/B_ID".

2) Extract the archived files:
------------------------------------------------------------
unzip /tmp/failed-tests.zip -d /tmp
------------------------------------------------------------

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

4) Examine the extracted screendumps:
------------------------------------------------------------
./src/vim --clean -S runtime/syntax/testdir/viewdumps.vim \
  /tmp/runtime/syntax/testdir/failed/*.dump
------------------------------------------------------------

5) Clean up:
------------------------------------------------------------
unlink /tmp/runtime/syntax/testdir/dumps
rm -rf /tmp/runtime
------------------------------------------------------------

============================================================

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>
11 months agoruntime(doc): fix a few style issues
h-east [Mon, 12 Aug 2024 16:26:08 +0000 (18:26 +0200)] 
runtime(doc): fix a few style issues

closes: #15478

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0672: marker folds may get corrupted on undo v9.1.0672
Christian Brabandt [Sun, 11 Aug 2024 18:12:41 +0000 (20:12 +0200)] 
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.

fixes: #15455
closes: #15466

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoProblem: crash with WinNewPre autocommand v9.1.0671
Christian Brabandt [Sun, 11 Aug 2024 18:09:17 +0000 (20:09 +0200)] 
Problem:  crash with WinNewPre autocommand

Problem:  crash with WinNewPre autocommand, because window
          structures are not yet safe to use
Solution: Don't trigger WinNewPre on :tabnew

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0670: po file encoding fails on *BSD during make v9.1.0670
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>
11 months agotranslation(it): Update Italian translation
Antonio Giovanni Colombo [Sun, 11 Aug 2024 17:49:16 +0000 (19:49 +0200)] 
translation(it): Update Italian translation

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agotranslation: Stop using msgconv
Ken Takata [Sun, 11 Aug 2024 17:06:58 +0000 (19:06 +0200)] 
translation: Stop using msgconv

It caused differences from Unix-like systems. Make sure that the same
files are generated both on Windows and Unix.

fixes: #14490
fixes: #14601
closes: #15469

Also
- update a few more auto-generated po files
- Make_mvc.mak work with Cygwin/MSYS2's gettext by using copy /b instead
  of copy /a

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0669: if_python: stable python ABI not used by default v9.1.0669
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>
11 months agoUpdate .gitignore and .hgignore files
Ken Takata [Sun, 11 Aug 2024 16:38:19 +0000 (18:38 +0200)] 
Update .gitignore and .hgignore files

Ignore auto-generated executable files in src/po/

closes: #15472

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0668: build-error with python3.12 and stable ABI v9.1.0668
Ken Takata [Sat, 10 Aug 2024 07:44:20 +0000 (09:44 +0200)] 
patch 9.1.0668: build-error with python3.12 and stable ABI

Problem:  build-error with python3.12 and stable ABI (zdohnal)
Solution: Add type casts, define Py_INCREF for Python3.12 and higher
          (Ken Takata)

fixes: #15460

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agotranslations: Update generated po files
Ken Takata [Sat, 10 Aug 2024 07:38:24 +0000 (09:38 +0200)] 
translations: Update generated po files

Some auto-generated po files cause differences after building Vim.
Update them.

closes: #15468

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0667: Some other options reset curswant unnecessarily when set v9.1.0667
zeertzjq [Sat, 10 Aug 2024 07:35:20 +0000 (09:35 +0200)] 
patch 9.1.0667: Some other options reset curswant unnecessarily when set

Problem:  Some other options reset curswant unnecessarily when set.
          (Andrew Haust)
Solution: Don't reset curswant when setting 'comments', 'commentstring'
          or 'define' (zeertzjq)

fixes: #15462
closes: #15467

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0666: assert_equal() doesn't show multibyte string correctly v9.1.0666
zeertzjq [Fri, 9 Aug 2024 17:52:10 +0000 (19:52 +0200)] 
patch 9.1.0666: assert_equal() doesn't show multibyte string correctly

Problem:  assert_equal() doesn't show multibyte string correctly
Solution: Properly advance over a multibyte char.
          (zeertzjq)

closes: #15456

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(doc): clarify directory of Vim's executable vs CWD
zeertzjq [Thu, 8 Aug 2024 19:12:15 +0000 (21:12 +0200)] 
runtime(doc): clarify directory of Vim's executable vs CWD

According to :h win32-PATH, "the same directory as Vim" means the same
directory as the Vim executable, not Vim's current directory.  In patch
8.2.4860 these two concepts were mixed up.

closes: #15451

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0665: Locked variable can be changed in a :for loop v9.1.0665
zeertzjq [Thu, 8 Aug 2024 19:05:57 +0000 (21:05 +0200)] 
patch 9.1.0665: Locked variable can be changed in a :for loop

Problem:  Locked variable can be changed in a :for loop.
Solution: Always do a full permission check on the first loop iteration
          where ASSIGN_DECL is not set (zeertzjq).

related: #12470
fixes: #15450
closes: #15454

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(proto): Add indent script for protobuf filetype
David Pedersen [Wed, 7 Aug 2024 19:23:59 +0000 (21:23 +0200)] 
runtime(proto): Add indent script for protobuf filetype

closes: #15446

Signed-off-by: David Pedersen <limero@me.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0664: MS-Windows: console vim did not switch back to main screen on exit v9.1.0664
Ken Takata [Wed, 7 Aug 2024 19:18:24 +0000 (21:18 +0200)] 
patch 9.1.0664: MS-Windows: console vim did not switch back to main screen on exit

Problem:  MS-Windows: console vim did not switch back to main screen on
          exit
Solution: switch back to main screen on exit (Ken Takata)

`vim.exe --cmd quit` quitted without switching back to the main screen
buffer and the alternate screen buffer was kept shown.

Restore the main screen buffer even when termcap mode has not been
started.

closes: #15443

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): zip plugin does not work with Vim 9.0
Christian Brabandt [Wed, 7 Aug 2024 06:13:32 +0000 (08:13 +0200)] 
runtime(zip): zip plugin does not work with Vim 9.0

Problem:  zip plugin does not work with Vim 9.0
          because of :defer
Solution: raise minimum Vim version to Vim 9.1

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0663: tests: zip test still resets 'shellslash' option v9.1.0663
Christian Brabandt [Mon, 5 Aug 2024 19:08:42 +0000 (21:08 +0200)] 
patch 9.1.0663: tests: zip test still resets 'shellslash' option

Problem:  tests: zip test still resets 'shellslash' option
Solution: Remove resetting the 'shellslash' option, the zip
          plugin should now be able to handle this options

closes: #15434

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): use defer to restore old settings
Christian Brabandt [Tue, 6 Aug 2024 16:50:59 +0000 (18:50 +0200)] 
runtime(zip): use defer to restore old settings

Problem:  RestoreOpts() plugin called too often
Solution: use :defer to have the RestoreOpts() function
          called when the function returns automatically

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): add a generic Message function
Christian Brabandt [Tue, 6 Aug 2024 16:35:00 +0000 (18:35 +0200)] 
runtime(zip): add a generic Message function

Problem:  the zip plugin duplicates a lot of code for displaying
          warnings/errors
Solution: refactor common code into a generic Mess() function

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): increment base version of zip plugin
Christian Brabandt [Mon, 5 Aug 2024 19:26:46 +0000 (21:26 +0200)] 
runtime(zip): increment base version of zip plugin

Problem:  the zip plugin version is still v33
Solution: increment the version to v34

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): raise minimum Vim version to v9.0
Christian Brabandt [Mon, 5 Aug 2024 19:16:11 +0000 (21:16 +0200)] 
runtime(zip): raise minimum Vim version to v9.0

Problem:  the zip plugin uses features of Vim 9.0, but
          checks for a Vim version >= 7.2
          (interpolated strings and readblob() function)
Solution: raise the minimum Vim version to v9.0

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): refactor save and restore of options
Christian Brabandt [Mon, 5 Aug 2024 19:00:07 +0000 (21:00 +0200)] 
runtime(zip): refactor save and restore of options

Problem:  zip plugin has no way to set/restore option values
Solution: Add the SetSaneOpts() and RestoreOpts() functions,
          so options that cause issues are set to sane values
          and restored back to their initial values later on.
          (this affects the 'shellslash' option on windows, which also
          changes how the shellescape() function works)

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): remove test for fnameescape
Christian Brabandt [Mon, 5 Aug 2024 18:52:50 +0000 (20:52 +0200)] 
runtime(zip): remove test for fnameescape

Problem:  zip plugin tests for fnameescape() function
Solution: Remove the check, fnameescape() has been available since
          7.1.299, it should nowadays always be available

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): use :echomsg instead of :echo
Christian Brabandt [Mon, 5 Aug 2024 18:51:47 +0000 (20:51 +0200)] 
runtime(zip): use :echomsg instead of :echo

Problem:  zip plugin uses :echo which does not store messages
Solution: use :echomsg instead of :echo so that messages are stored in
          the message history

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agoruntime(zip): clean up and remove comments
Christian Brabandt [Mon, 5 Aug 2024 18:47:34 +0000 (20:47 +0200)] 
runtime(zip): clean up and remove comments

Problem:  zip plugin contains a lot of comments from the decho plugin
Solution: Clean up and remove un-used comments

Signed-off-by: Christian Brabandt <cb@256bit.org>
11 months agopatch 9.1.0662: filecopy() may return wrong value when readlink() fails v9.1.0662
zeertzjq [Tue, 6 Aug 2024 17:51:09 +0000 (19:51 +0200)] 
patch 9.1.0662: filecopy() may return wrong value when readlink() fails

Problem:  filecopy() may return wrong value when readlink() fails.
Solution: Set ret to -1 so that 0 is returned when readlink() fails.
          (zeertzjq)

closes: #15438

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0661: the zip plugin is not tested. v9.1.0661
Damien [Mon, 5 Aug 2024 18:24:11 +0000 (20:24 +0200)] 
patch 9.1.0661: the zip plugin is not tested.

Problem:  the zip plugin is not tested.
Solution: include tests (Damien)

closes: #15411

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(zip): Fix for FreeBSD's unzip command
Damien [Mon, 5 Aug 2024 18:21:18 +0000 (20:21 +0200)] 
runtime(zip): Fix for FreeBSD's unzip command

Problem:  Cannot browse zipfiles with the unzip program found
  on FreeBSD.
Solution: Adjust command arguments.

Unzip found on FreeBSD complain about missing argument with the
zipinfo modifier '-Z -1'. Joining arguments seems to work
for both implementations.

Also change `:sil!` to `:sil` so that error messages are properly
reported (per review of Christian Brabandt).

related: #15411

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(doc): capitalize correctly
Christian Brabandt [Mon, 5 Aug 2024 15:36:09 +0000 (17:36 +0200)] 
runtime(doc): capitalize correctly

* do not capitalize after a double colon when introducing a list
* Capitalize a header line

closes: #15433

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0660: MS-Windows: Shift-Insert does work on old conhost v9.1.0660
Christopher Plewright [Sun, 4 Aug 2024 17:57:44 +0000 (19:57 +0200)] 
patch 9.1.0660: MS-Windows: Shift-Insert does work on old conhost

Problem:  MS-Windows: Shift-Insert does not work on old conhost
          (Nick Jensen, after 9.0.1146)
Solution: handle Shift-Insert specifically
          (Christian Plewright)

fixes: #15326
closes: #15430

Signed-off-by: Christopher Plewright <chris@createng.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agotranslation(it): update Italian manpage
Antonio Giovanni Colombo [Sun, 4 Aug 2024 16:52:55 +0000 (18:52 +0200)] 
translation(it): update Italian manpage

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(lua): add/subtract a 'shiftwidth' after '('/')' in indentexpr
Yinzuo Jiang [Sun, 4 Aug 2024 16:47:25 +0000 (18:47 +0200)] 
runtime(lua): add/subtract a 'shiftwidth' after '('/')' in indentexpr

Problem:

- Current lua indentexpr does not indent for '(' ')'.
- Missing indent test for lua.

Solution:

- Match '(', ')' in `function GetLuaIndentIntern`.
- Add an indent test for lua.

closes: #15364

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(zip): escape '[' on Unix as well
zeertzjq [Sun, 4 Aug 2024 16:35:50 +0000 (18:35 +0200)] 
runtime(zip): escape '[' on Unix as well

Problem:  After 6f1cbfc9ab483a09877e153ad130164875c40b1d fnameescape()
          is no longer called on the name of the file to be extracted.
          However, while spaces indeed don't need to be escaped, unzip
          treats '[' as a wildcard character, so it need to be escaped.
Solution: Escape '[' on both MS-Windows and Unix.

From the docs it seems '*' and '?' also need escaping, but they seem to
actually work without escaping.

fixes: neovim/neovim#29977
closes: #15427

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0659: MS-Windows: MSVC Makefile is a bit hard to read v9.1.0659
Ken Takata [Sun, 4 Aug 2024 16:31:48 +0000 (18:31 +0200)] 
patch 9.1.0659: MS-Windows: MSVC Makefile is a bit hard to read

Problem:  MS-Windows: MSVC Makefile is a bit hard to read
          (after v9.1.0657)
Solution: indent the if/else statements to improve readability
          (Ken Takata)

closes: #15428

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(doc): fix typo in syntax.txt
Jon Parise [Sat, 3 Aug 2024 15:40:58 +0000 (17:40 +0200)] 
runtime(doc): fix typo in syntax.txt

closes: #15425

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(doc): -x is only available when compiled with crypt feature
Christian Brabandt [Sat, 3 Aug 2024 13:40:19 +0000 (15:40 +0200)] 
runtime(doc): -x is only available when compiled with crypt feature

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0658: Coverity warns about dereferencing NULL pointer. v9.1.0658
zeertzjq [Sat, 3 Aug 2024 12:52:00 +0000 (14:52 +0200)] 
patch 9.1.0658: Coverity warns about dereferencing NULL pointer.

Problem:  Coverity warns about dereferencing NULL pointer.
Solution: Bail out if vim_strrchr() returns NULL.
          (zeertzjq)

________________________________________________________________________________________________________
*** CID 1616019:    (NULL_RETURNS)
/src/help.c: 834 in fix_help_buffer()
828                                  continue;
829                              t2 = gettail(f2);
830                              e2 = vim_strrchr(t2, '.');
831                              if (e1 - f1 != e2 - f2
832                                          || fnamencmp(f1, f2, e1 - f1) != 0)
833                                  continue;
>>>     CID 1616019:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "(char_u *)e2" when calling "vim_fnamecmp".
834                              if (fnamecmp(e1, ".txt") == 0
835                                             && fnamecmp(e2, fname + 4) == 0)
836                                  // use .abx instead of .txt
837                                  VIM_CLEAR(fnames[i1]);
838                          }
839                      }
/src/help.c: 816 in fix_help_buffer()
810                      // the same directory.
811                      for (i1 = 0; i1 < fcount; ++i1)
812                      {
813                          f1 = fnames[i1];
814                          t1 = gettail(f1);
815                          e1 = vim_strrchr(t1, '.');
>>>     CID 1616019:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "(char_u *)e1" when calling "vim_fnamecmp".
816                          if (fnamecmp(e1, ".txt") != 0
817                                             && fnamecmp(e1, fname + 4) != 0)
818                          {
819                              // Not .txt and not .abx, remove it.
820                              VIM_CLEAR(fnames[i1]);
821                              continue;

closes: #15420

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(colors): update Todo highlight in habamax colorscheme
Maxim Kim [Sat, 3 Aug 2024 12:48:16 +0000 (14:48 +0200)] 
runtime(colors): update Todo highlight in habamax colorscheme

Magenta background Todo is too bright and might interfere with DiffText.
Make it less strong, without background, bold.

closes: #15423

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0657: MS-Windows: MSVC build time can be optimized v9.1.0657
Ken Takata [Sat, 3 Aug 2024 12:40:35 +0000 (14:40 +0200)] 
patch 9.1.0657: MS-Windows: MSVC build time can be optimized

Problem:  MS-Windows: MSVC build time can be optimized
Solution: Stop using Powershell, show detected version, read _MSC_VER
          and _MSC_FULL_VER in a single cl execution. (Ken Takata)

closes: #15421

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0656: MS-Windows: MSVC Makefile CPU handling can be improved v9.1.0656
Ken Takata [Sat, 3 Aug 2024 12:34:33 +0000 (14:34 +0200)] 
patch 9.1.0656: MS-Windows: MSVC Makefile CPU handling can be improved

Problem:  MS-Windows: MSVC Makefile CPU handling can be improved
Solution: Update Makefile and also remove some old code
          (Ken Takata)

* The variable `ASSEMBLY_ARCHITECTURE` was originally used to generate
  the manifest file. However, this was removed in v7.0.198.  Remove
  `ASSEMBLY_ARCHITECTURE` and use `CPU` instead.
* `/arch:AVX512` is available starting from Visual C++ 2017.
* ARM64 was not considered when validating CPUNR.
  Skip the validation for ARM64 for now.
* Remove old code for VC6/7 and Win9x.

closes: #15422

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0655: filetype: goaccess config file not recognized v9.1.0655
Adam Monsen [Fri, 2 Aug 2024 17:54:15 +0000 (19:54 +0200)] 
patch 9.1.0655: filetype: goaccess config file not recognized

Problem:  filetype: goaccess config file not recognized
Solution: detect 'goaccess.conf' as goaccess filetype, also
          include a basic syntax and ftplugin (Adam Monsen)

Add syntax highlighting for GoAccess configuration file.

GoAccess is a real-time web log analyzer and interactive viewer that
runs in a terminal in *nix systems or through your browser.

GoAccess home page: https://goaccess.io

closes: #15414

Signed-off-by: Adam Monsen <haircut@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoCI: update clang compiler to version 20
Philip H [Fri, 2 Aug 2024 17:45:52 +0000 (19:45 +0200)] 
CI: update clang compiler to version 20

closes: #15416

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(netrw): honor `g:netrw_alt{o,v}` for `:{S,H,V}explore`
Ivan Shapovalov [Fri, 2 Aug 2024 17:43:12 +0000 (19:43 +0200)] 
runtime(netrw): honor `g:netrw_alt{o,v}` for `:{S,H,V}explore`

Make `:Sexplore` / `:Hexplore` / `:Vexplore` commands honor the user
`&split{right,below}` settings (or netrw-specific `g:netrw_alt{o,v}`)
instead of hardcoding a split direction. Similarly, update banged
variants of the two latter commands to follow the inverted preference.

closes: #15417

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0654: completion does not respect completeslash with fuzzy v9.1.0654
glepnir [Fri, 2 Aug 2024 17:14:38 +0000 (19:14 +0200)] 
patch 9.1.0654: completion does not respect completeslash with fuzzy

Problem:  completion does not respect completeslash with fuzzy
          (egesip)
Solution: Change path separator on Windows, depending on 'completeslash'
          option value (glepnir)

fixes: #15392
closes: #15418

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0653: Patch v9.1.0648 not completely right v9.1.0653
Christian Brabandt [Fri, 2 Aug 2024 17:06:41 +0000 (19:06 +0200)] 
patch 9.1.0653: Patch v9.1.0648 not completely right

Problem:  Patch v9.1.0648 not completely right
          (zeertzjq)
Solution: Remove always true condition

closes: #15415

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0652: too many strlen() calls in syntax.c v9.1.0652
John Marriott [Thu, 1 Aug 2024 21:01:25 +0000 (23:01 +0200)] 
patch 9.1.0652: too many strlen() calls in syntax.c

Problem:  too many strlen() calls in syntax.c
Solution: refactor code to reduce the number or strlen() calls,
          get rid of un-used SYN_NAMELEN macro
          (John Marriott)

closes: #15368

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0651: ex: trailing dot is optional for :g and :insert/:append v9.1.0651
Mohamed Akram [Thu, 1 Aug 2024 20:53:01 +0000 (22:53 +0200)] 
patch 9.1.0651: ex: trailing dot is optional for :g and :insert/:append

Problem:  ex: trailing dot is optional for :g and :insert/:append
Solution: don't break out early, when the next command is empty.
          (Mohamed Akram)

The terminating period is optional for the last command in a global
command list.

closes: #15407

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0650: Coverity warning in cstrncmp() v9.1.0650
zeertzjq [Thu, 1 Aug 2024 20:48:53 +0000 (22:48 +0200)] 
patch 9.1.0650: Coverity warning in cstrncmp()

Problem:  Coverity warning in cstrncmp()
          (after v9.1.0645)
Solution: Change the type of n2 to int.
          (zeertzjq)

________________________________________________________________________________________________________
*** CID 1615684:  Integer handling issues  (INTEGER_OVERFLOW)
/src/regexp.c: 1757 in cstrncmp()
1751                 n1 -= mb_ptr2len(s1);
1752                 MB_PTR_ADV(p);
1753                 n2++;
1754             }
1755             // count the number of bytes to advance the same number of chars for s2
1756             p = s2;
>>>     CID 1615684:  Integer handling issues  (INTEGER_OVERFLOW)
>>>     Expression "n2--", which is equal to 18446744073709551615, where "n2" is known to be equal to 0, underflows the type that receives it, an unsigned integer 64 bits wide.
1757             while (n2-- > 0 && *p != NUL)
1758                 MB_PTR_ADV(p);
1759
1760             n2 = p - s2;
1761
1762             result = MB_STRNICMP2(s1, s2, *n, n2);

closes: #15409

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0649: Wrong comment for "len" argument of call_simple_func() v9.1.0649
zeertzjq [Thu, 1 Aug 2024 20:46:54 +0000 (22:46 +0200)] 
patch 9.1.0649: Wrong comment for "len" argument of call_simple_func()

Problem:  Wrong comment for "len" argument of call_simple_func().
Solution: Remove the "or -1 to use strlen()".  Also change its type to
          size_t to remove one cast. (zeertzjq)

closes: #15410

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0648: [security] double-free in dialog_changed() v9.1.0648
Christian Brabandt [Thu, 1 Aug 2024 20:10:28 +0000 (22:10 +0200)] 
patch 9.1.0648: [security] double-free in dialog_changed()

Problem:  [security] double-free in dialog_changed()
          (SuyueGuo)
Solution: Only clear pointer b_sfname pointer, if it is different
          than the b_ffname pointer.  Don't try to free b_fname,
          set it to NULL instead.

fixes: #15403

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-46pw-v7qw-xc2f

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0647: [security] use-after-free in tagstack_clear_entry v9.1.0647
Christian Brabandt [Thu, 1 Aug 2024 18:16:51 +0000 (20:16 +0200)] 
patch 9.1.0647: [security] use-after-free in tagstack_clear_entry

Problem:  [security] use-after-free in tagstack_clear_entry
          (Suyue Guo )
Solution: Instead of manually calling vim_free() on each of the tagstack
          entries, let's use tagstack_clear_entry(), which will
          also free the stack, but using the VIM_CLEAR macro,
          which prevents a use-after-free by setting those pointers
          to NULL

This addresses CVE-2024-41957

Github advisory:
https://github.com/vim/vim/security/advisories/GHSA-f9cr-gv85-hcr4

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(doc): re-format tag example lines, mention ctags --list-kinds
Christian Brabandt [Thu, 1 Aug 2024 07:25:58 +0000 (09:25 +0200)] 
runtime(doc): re-format tag example lines, mention ctags --list-kinds

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0646: Vim9: imported function may not be found v9.1.0646
Ernie Rael [Wed, 31 Jul 2024 20:18:11 +0000 (22:18 +0200)] 
patch 9.1.0646: Vim9: imported function may not be found

Problem:  Vim9: imported function may not be found
Solution: Try to find the function by name (Ernie Rael)

fixes: #15381
closes: #15382

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(java): Document "g:java_space_errors" and "g:java_comment_strings"
Aliaksei Budavei [Wed, 31 Jul 2024 20:16:08 +0000 (22:16 +0200)] 
runtime(java): Document "g:java_space_errors" and "g:java_comment_strings"

closes: #15399

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(java): Cluster optional group definitions and their group links
Aliaksei Budavei [Wed, 31 Jul 2024 20:15:16 +0000 (22:15 +0200)] 
runtime(java): Cluster optional group definitions and their group links

And keep non-optional group links at the end of the file.

related: #15399

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(java): Tidy up the syntax file
Aliaksei Budavei [Wed, 31 Jul 2024 20:14:37 +0000 (22:14 +0200)] 
runtime(java): Tidy up the syntax file

- Prefix all global variables with "g:".
- Add spaces around each variable assignment operator.
- Remove extraneous whitespace characters.
- Remove a spurious _serializable_ Java keyword (since v1.1,
  java.io.Serializable and java.io.Externalizable interfaces
  provide an API for object serialization; see vim-6-0j).
- Normalise the syntax definition argument order by making
  _contained_ the first argument of each such definition.
- Normalise the argument tabulation for highlighting group
  definitions.

Reference:
https://web.archive.org/web/20010821025330/java.sun.com/docs/books/jls/first_edition/html/1.1Update.html

related: #15399

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(java): Tidy up the documentation for "ft-java-syntax"
Aliaksei Budavei [Wed, 31 Jul 2024 20:13:25 +0000 (22:13 +0200)] 
runtime(java): Tidy up the documentation for "ft-java-syntax"

- Reword a few sentences and reformat a few paragraphs.
- Supply absent capitalisation and punctuation.
- Make listed highlighting groups and code stand out.
- Prefix all Java-related global variables with "g:".
- Add spaces around each variable assignment operator.
- Acknowledge that some Javadoc variables are maintained in
  the HTML syntax file.

Also, move the overridable _default_ HTML group links before
the HTML syntax file inclusion in order to implement the
documented diverged settings.

related: #15399

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(colors): update habamax scheme - tweak diff/search/todo colors
Maxim Kim [Wed, 31 Jul 2024 20:09:24 +0000 (22:09 +0200)] 
runtime(colors): update habamax scheme - tweak diff/search/todo colors

- Make diff colors more accessible, Green for added, Red for deleted, Blue for Changed
- Change Search to blue to be visible with Diff colors
- Change Todo to bright magenta

closes: #15400

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(nohlsearch): add missing loaded_hlsearch guard
Maxim Kim [Wed, 31 Jul 2024 20:07:43 +0000 (22:07 +0200)] 
runtime(nohlsearch): add missing loaded_hlsearch guard

related: #15039
closes: #15402

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(kivy): Updated maintainer info for syntax script
Corey Prophitt [Wed, 31 Jul 2024 19:53:45 +0000 (21:53 +0200)] 
runtime(kivy): Updated maintainer info for syntax script

closes: #15405

Signed-off-by: Corey Prophitt <git@prophitt.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoMaintainers: Add maintainer for ondir ftplugin + syntax files
Jon Parise [Tue, 30 Jul 2024 19:21:43 +0000 (21:21 +0200)] 
Maintainers: Add maintainer for ondir ftplugin + syntax files

closes: #15397

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(netrw): removing trailing slash when copying files in same directory
Travis Shelton [Tue, 30 Jul 2024 19:08:56 +0000 (21:08 +0200)] 
runtime(netrw): removing trailing slash when copying files in same directory

closes: #14756

Signed-off-by: Travis Shelton <tshelton.mail@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0645: regex: wrong match when searching multi-byte char case-insensitive v9.1.0645
Christian Brabandt [Tue, 30 Jul 2024 18:39:18 +0000 (20:39 +0200)] 
patch 9.1.0645: regex: wrong match when searching multi-byte char case-insensitive

Problem:  regex: wrong match when searching multi-byte char
          case-insensitive (diffsetter)
Solution: Apply proper case-folding for characters and search-string

This patch does the following 4 things:

1) When the regexp engine compares two utf-8 codepoints case
   insensitive it may match an adjacent character, because it assumes
   it can step over as many bytes as the pattern contains.

   This however is not necessarily true because of case-folding, a
   multi-byte UTF-8 character can be considered equal to some
   single-byte value.

   Let's consider the pattern 'ſ' and the string 's'. When comparing and
   ignoring case, the single character 's' matches, and since it matches
   Vim will try to step over the match (by the amount of bytes of the
   pattern), assuming that since it matches, the length of both strings is
   the same.

   However in that case, it should only step over the single byte value
   's' by 1 byte and try to start matching after it again. So for the
   backtracking engine we need to ensure:
   * we try to match the correct length for the pattern and the text
   * in case of a match, we step over it correctly

   There is one tricky thing for the backtracing engine. We also need to
   calculate correctly the number of bytes to compare the 2 different
   utf-8 strings s1 and s2. So we will count the number of characters in
   s1 that the byte len specified. Then we count the number of bytes to
   step over the same number of characters in string s2 and then we can
   correctly compare the 2 utf-8 strings.

2) A similar thing can happen for the NFA engine, when skipping to the
   next character to test for a match. We are skipping over the regstart
   pointer, however we do not consider the case that because of
   case-folding we may need to adjust the number of bytes to skip over.
   So this needs to be adjusted in find_match_text() as well.

3) A related issue turned out, when prog->match_text is actually empty.
   In that case we should try to find the next match and skip this
   condition.

4) When comparing characters using collections, we must also apply case
   folding to each character in the collection and not just to the
   current character from the search string.  This doesn't apply to the
   NFA engine, because internally it converts collections to branches
   [abc] -> a\|b\|c

fixes: #14294
closes: #14756

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(html): update syntax script to sync by 250 minlines by default
Christian Brabandt [Tue, 30 Jul 2024 18:19:15 +0000 (20:19 +0200)] 
runtime(html): update syntax script to sync by 250 minlines by default

closes: #14071

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0644: Unnecessary STRLEN() when applying mapping v9.1.0644
zeertzjq [Tue, 30 Jul 2024 17:17:56 +0000 (19:17 +0200)] 
patch 9.1.0644: Unnecessary STRLEN() when applying mapping

Problem:  Unnecessary STRLEN() when applying mapping.
          (after v9.1.0642)
Solution: Use m_keylen and vim_strnsave().
          (zeertzjq)

closes: #15394

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(zip): Opening a remote zipfile don't work
Damien [Tue, 30 Jul 2024 17:14:35 +0000 (19:14 +0200)] 
runtime(zip): Opening a remote zipfile don't work

Problem:  Opening a zipfile from HTTP gives an empty buffer.
Solution: Ensure that the magic bytes check does not
          skip protocol processing.

Also use readblob() and remove commented out lines.

closes: #15396

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(cuda): source c and cpp ftplugins
Yinzuo Jiang [Tue, 30 Jul 2024 16:15:30 +0000 (18:15 +0200)] 
runtime(cuda): source c and cpp ftplugins

closes: #15383

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0643: terminal: cursor may end up on invalid position v9.1.0643
Christian Brabandt [Mon, 29 Jul 2024 19:19:51 +0000 (21:19 +0200)] 
patch 9.1.0643: terminal: cursor may end up on invalid position

Problem:  terminal: cursor may end up on invalid position after reducing
          the scrollback lines (user202729)
Solution: After reducing the scrollback size, check the cursor position,
          making sure it does not end up on an invalid line

fixes: #15351

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0642: Check that mapping rhs starts with lhs fails if not simplified v9.1.0642
zeertzjq [Mon, 29 Jul 2024 19:10:07 +0000 (21:10 +0200)] 
patch 9.1.0642: Check that mapping rhs starts with lhs fails if not simplified

Problem:  Check that mapping rhs starts with lhs doesn't work if lhs is
          not simplified.
Solution: Keep track of the mapblock containing the alternative lhs and
          also compare with it (zeertzjq).

fixes: #15376
closes: #15384

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0641: MS-Windows: OLE enabled in console version v9.1.0641
Ken Takata [Mon, 29 Jul 2024 18:57:19 +0000 (20:57 +0200)] 
patch 9.1.0641: MS-Windows: OLE enabled in console version

Problem:  MS-Windows: OLE enabled in console version, may cause hang
          (Linda_pp)
Solution: Disable OLE for console version (Ken Takata)

If VIMDLL was enabled, a message box for registering OLE might be shown
even if Vim was executed in a console. (See #15372)

Enabling OLE in a console is not so useful.  Disable it.

fixes: #15372
closes: #15385

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(thrift): add ftplugin, indent and syntax scripts
Yinzuo Jiang [Mon, 29 Jul 2024 18:51:05 +0000 (20:51 +0200)] 
runtime(thrift): add ftplugin, indent and syntax scripts

Problem: Apache Thrift files misses ftplugin, indent and syntax scripts

Solution:
- add ftplugin and indent scripts
- add thrift indent test
- port the syntax script from apache/thrift (Apache License 2)

Reference:
https://diwakergupta.github.io/thrift-missing-guide/#_language_reference

closes: #15387

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0640: Mingw: Makefile can be improved v9.1.0640
Ken Takata [Mon, 29 Jul 2024 18:43:21 +0000 (20:43 +0200)] 
patch 9.1.0640: Mingw: Makefile can be improved

Problem:  Mingw: Makefile can be improved
Solution: Reduce nesting level, directly check if the '-Wl,--entry'
          option is required (Ken Takata)

closes: #15386

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0639: channel timeout may wrap around v9.1.0639
Ken Takata [Mon, 29 Jul 2024 18:39:12 +0000 (20:39 +0200)] 
patch 9.1.0639: channel timeout may wrap around

Problem:  channel timeout may wrap around
Solution: Correct timeout calculation when GetTickCount() wraps around
          (Ken Takata)

closes: #15390

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0638: E1510 may happen when formatting a message for smsg() v9.1.0638
zeertzjq [Mon, 29 Jul 2024 18:28:14 +0000 (20:28 +0200)] 
patch 9.1.0638: E1510 may happen when formatting a message for smsg()

Problem:  E1510 may happen when formatting a message
          (after 9.1.0181).
Solution: Only give E1510 when using typval. (zeertzjq)

closes: #15391

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0637: MS-Windows: Style issues in MSVC Makefile v9.1.0637
Ken Takata [Mon, 29 Jul 2024 17:52:03 +0000 (19:52 +0200)] 
patch 9.1.0637: MS-Windows: Style issues in MSVC Makefile

Problem:  MS-Windows: Style issues in MSVC Makefile
Solution: Fix style issues, simplify logic
          (Ken Takata)

* Add space around the operators for consistency.
* Remove unnecessary ren command. Use the /Fe option to create
  install.exe directly.
* Remove unnecessary mkdir auto command. src/auto should always exist.

closes: #15389

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0636: filetype: ziggy files are not recognized v9.1.0636
EliSauder [Sun, 28 Jul 2024 19:32:38 +0000 (21:32 +0200)] 
patch 9.1.0636: filetype: ziggy files are not recognized

Problem:  filetype: ziggy files are not recognized
Solution: detect '*.ziggy' files as ziggy filetype,
          detect '*.ziggy-schema' files as ziggy-schema filetype
          (EliSauder)

References: https://ziggy-lang.io/

fixes: #15355
closes: #15367

Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0635: filetype: SuperHTML template files not recognized v9.1.0635
EliSauder [Sun, 28 Jul 2024 19:28:11 +0000 (21:28 +0200)] 
patch 9.1.0635: filetype: SuperHTML template files not recognized

Problem:  filetype: SuperHTML template files not recognized
Solution: Update the filetype detection code to detect '*.shtml' either
          as HTML (Server Side Includes) or SuperHTML (template files)
          (EliSauder)

related: #15355
related: #15367

Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0634: Ctrl-P not working by default v9.1.0634
Christian Brabandt [Sun, 28 Jul 2024 19:16:48 +0000 (21:16 +0200)] 
patch 9.1.0634: Ctrl-P not working by default

Problem:  Ctrl-P not working by default
          (Jesse Pavel, after v9.1.0598)
Solution: Revert part of v9.1.0598 and set cur_match_pos
          correctly according to compl_dir_forward()

fixes: #15370
closes: #15379

Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0633: Compilation warnings with `-Wunused-parameter` v9.1.0633
Dominique Pellé [Sun, 28 Jul 2024 19:12:20 +0000 (21:12 +0200)] 
patch 9.1.0633: Compilation warnings with `-Wunused-parameter`

Problem:  Compilation warnings with `-Wunused-parameter`
Solution: Add the `UNUSED` macro where needed, and remove some
          superfluous ones (Dominique Pellé)

Change fixes these kind of warnings when building without the channel
feature:

```
eval.c:6122:15: warning: unused parameter ‘tv’ [-Wunused-parameter]
     typval_T *tv,
               ^
eval.c:6123:14: warning: unused parameter ‘tofree’ [-Wunused-parameter]
     char_u **tofree,
              ^
eval.c:6124:13: warning: unused parameter ‘numbuf’ [-Wunused-parameter]
     char_u *numbuf,
             ^
eval.c:6125:10: warning: unused parameter ‘composite_val’ [-Wunused-parameter]
     int  composite_val)
```

closes: #15378

Signed-off-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0632: MS-Windows: Compiler Warnings v9.1.0632
Ken Takata [Sun, 28 Jul 2024 15:08:15 +0000 (17:08 +0200)] 
patch 9.1.0632: MS-Windows: Compiler Warnings

Problem:  MS-Windows: Compiler Warnings
Solution: Fix the warnings (Ken Takata)

* Unused variable.
* Conversion from size_t to int.

closes: #15369

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(debcopyright): Add support for Files-Included in syntax script
josch [Sun, 28 Jul 2024 15:05:06 +0000 (17:05 +0200)] 
runtime(debcopyright): Add support for Files-Included in syntax script

Full support (including for components) was finished with this commit:
https://salsa.debian.org/debian/devscripts/-/commit/ee90dad7712a7db1e9541b405e065a08d29d62f8

closes: #15374

Signed-off-by: josch <josch@debian.org>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(doc): tweak documentation style a bit
h-east [Sun, 28 Jul 2024 15:03:29 +0000 (17:03 +0200)] 
runtime(doc): tweak documentation style a bit

closes: #15371

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0631: wrong completion list displayed with non-existing dir + fuzzy completion v9.1.0631
glepnir [Sat, 27 Jul 2024 14:25:45 +0000 (16:25 +0200)] 
patch 9.1.0631: wrong completion list displayed with non-existing dir + fuzzy completion

Problem:  wrong completion list displayed with non-existing dir + fuzzy
          completion (kawarimidoll)
Solution: clear list of matches, if leader did not use fuzzy match
          (glepnir)

fixes: #15357
closes: #15365

Signed-off-by: glepnir <glephunter@gmail.com>
12 months agopatch 9.1.0630: MS-Windows: build fails with VIMDLL and mzscheme v9.1.0630
Ken Takata [Sat, 27 Jul 2024 11:25:34 +0000 (13:25 +0200)] 
patch 9.1.0630: MS-Windows: build fails with VIMDLL and mzscheme

Problem:  MS-Windows: build fails with VIMDLL and mzscheme
Solution: define scheme_register_tls_space() inside gvim.exe
          and refer to it from the dll (Ken Takata).

`scheme_register_tls_space()` doesn't support a thread-local variable in
a DLL:
https://docs.racket-lang.org/inside/im_memoryalloc.html#%28cpp._scheme_register_tls_space%29

closes: #15363

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0629: Rename of pum hl_group is incomplete v9.1.0629
zeertzjq [Sat, 27 Jul 2024 11:21:49 +0000 (13:21 +0200)] 
patch 9.1.0629: Rename of pum hl_group is incomplete

Problem:  Rename of pum hl_group is incomplete in source.
Solution: Also rename the test function.  Rename to user_hlattr in code
          to avoid confusion with pum_extra.  Add test with matched text
          highlighting (zeertzjq).

closes: #15348

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0628: MinGW: coverage files are not cleaned up v9.1.0628
Ken Takata [Sat, 27 Jul 2024 11:14:35 +0000 (13:14 +0200)] 
patch 9.1.0628: MinGW: coverage files are not cleaned up

Problem:  MinGW: coverage files are not cleaned up
Solution: Adjust clean rule to remove the coverage files
          (Ken Takata)

closes: #15361

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0627: MinGW: build-error when COVERAGE is enabled v9.1.0627
Ken Takata [Sat, 27 Jul 2024 11:11:27 +0000 (13:11 +0200)] 
patch 9.1.0627: MinGW: build-error when COVERAGE is enabled

Problem:  MinGW: build-error when COVERAGE is enabled
          (after v9.1.0621)
Solution: Fix regressions in v9.1.0621 and v9.1.0622
          (Ken Takata)

* Fix build error when COVERAGE=yes.
* Fix if_lua with USE_GC_SECTIONS=yes.

related: #15361

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agopatch 9.1.0626: Vim9: need more tests with null objects v9.1.0626
Ernie Rael [Fri, 26 Jul 2024 17:40:29 +0000 (19:40 +0200)] 
patch 9.1.0626: Vim9: need more tests with null objects

Problem:  Vim9: need more tests with null objects
          (after v9.1.0620)
Solution: add one more test with null_object
          (Ernie Rael)

closes: #15360

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 months agoruntime(autohotkey): include initial filetype plugin
Peter Aronoff [Fri, 26 Jul 2024 17:24:33 +0000 (19:24 +0200)] 
runtime(autohotkey): include initial filetype plugin

closes: #15345

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