1
0
forked from aniani/vim

19707 Commits

Author SHA1 Message Date
dkearns
ae321b51f7
runtime(vim): Update base-syntax, match shebang lines (#15011)
Match shebang lines in Vim9 and legacy script.

Mark these as an error if they appear anywhere other than the first line
of a legacy-script file.  In Vim9 script these match as normal line
comments rather than an error.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 15:06:17 +02:00
Christian Brabandt
1c67342912
runtime(zip): MS-Windows: handle files with spaces properly
This change does the following 3 things:

1) non need to quote the file to be extracted

The zipfile plugin used to quote and fnameescape() the path to the
file to be extracted. However testing with unzip showed, that while this
works on Linux on Windows you shall not escape the blanks in filenames.

As long as the pathname is properly quoted, this words on Linux and
Windows.

2) reset shellslash (MS-Windows only)

When shellslash is set, filenames to the zip archive will be forward
quoted. However since the filename is eventually handed over to the
unzip command, we need to make sure to use native paths so that the
command will understand what file to open. Therefore, if shellslash is
set (and the shell is cmd.exe), replace any forward slashes by the
expected backslashes

3) style:
Use tabs for the Header, remove a few comments in the s:Escape() and
zip#read() functions

fixes: #14998

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 14:51:07 +02:00
Doug Kearns
6dd5840fdf
runtime(html): Restore HTML syntax file tests
Rendered element content results in test failures on macOS and FreeBSD.

The included content for these elements was incidental to the primary
intent of the test to check element tag highlighting so set
g:html_no_rendering to disable content rendering.

FreeBSD fails for even an empty <strike> element.

See #13591 and #14215.

closes: #13595

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 21:18:33 +02:00
glepnir
f94c9c482a
patch 9.1.0487: completed item not update on fuzzy completion
Problem:  completed item not update on fuzzy completion
Solution: reset compl_shown_match when at original match position
          (glepnir)

closes: #14955

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0487
2024-06-14 21:11:56 +02:00
Riley Bruins
82a579e15a
patch 9.1.0486: filetype: Snakemake files are not recognized
Problem:  filetype: Snakemake files are not recognized
Solution: Detect '*.smk' and Snakefile files as snakemake filetype
          (Riley Bruins)

See:
https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility

closes: #14992

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0486
2024-06-14 20:47:05 +02:00
Damien Riegel
17e702a51a
runtime(termdebug): make TermDebugSendCommand() a global function again
TermDebugSendCommand lost it's global visibility when converted to
vim9script. Restore it.

Fixes: 23f29ffc6427 ("runtime(termdebug): convert termdebug plugin to
       Vim9 script")
closes: #14997

Signed-off-by: Damien Riegel <damien@riegel.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:42:35 +02:00
Damien Riegel
fce324f557
runtime(termdebug): close all buffers in the same way
For ASM and Variables buffer, check were done to make sure they existed
before attempting to close them, but not for debugged program or gdb
communication. The debugged program window is a user-facing one and
user might close it manually, so it's better to check if it exists.

Signed-off-by: Damien Riegel <damien@riegel.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:41:36 +02:00
zeertzjq
afbe5359e9
patch 9.1.0485: Matched text shouldn't be highlighted in "kind" and "menu"
Problem:  Matched text shouldn't be highlighted in "kind" and "menu".
Solution: Pass hlf_T instead of the attribute.  Fix indent.
          (zeertzjq)

closes: #14996

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0485
2024-06-14 20:24:22 +02:00
Christian Brabandt
c509c009bb
runtime(doc): fix wrong helptag for :defer
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:23:00 +02:00
Doug Kearns
262e25e5a1
runtime(vim): Update base-syntax, match :sleep arg
Match :sleep arg properly including a lone "m" with a leading count.

closes: #15003

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:16:35 +02:00
Misho
79a14c061b
runtime(keymap): include Georgian keymap
closes: #15002

Signed-off-by: Misho <nnamper@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:13:39 +02:00
zeertzjq
8e56747fd2
patch 9.1.0484: Sorting of completeopt+=fuzzy is not stable
Problem:  Sorting of completeopt+=fuzzy is not stable.
Solution: Compare original indexes when scores are the same.
          (zeertzjq)

closes: #14988

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0484
2024-06-14 20:04:42 +02:00
Christian Brabandt
440746158c
runtime(netrw): correctly test for windows in NetrwGlob()
use has("win32") instead of has("win64") otherwise it
won't work on x86 systems.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 08:19:22 +02:00
Christian Brabandt
1487947fb6
runtime(netrw): glob() on windows fails with [] in directory name
fixes: #14952
closes: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 21:25:35 +02:00
Christian Brabandt
d6d4e13336
runtime(doc): rewrite mkdir() doc and simplify {flags} meaning
related: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 21:24:51 +02:00
Christian Brabandt
8b34aea1b0
patch 9.1.0483: glob() not sufficiently tested
Problem:  glob() not sufficiently tested
Solution: Add more tests for directory containing [] chars

related: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0483
2024-06-13 21:20:20 +02:00
Christian Brabandt
1cd31a4501
runtime(doc): update return type for job_info()
related: #14982

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 20:46:23 +02:00
Patrick Brinich-Langlois
4225f28855
README.md: Update link to release archives
The releases page doesn't have anything listed.

closes: #14990

Signed-off-by: Patrick Brinich-Langlois <pbrinichlanglois@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 20:22:13 +02:00
Ubaldo Tiberi
ef8eab86e2
patch 9.1.0482: termdebug plugin needs more love
Problem:  termdebug plugin needs more love
Solution: start with some more Vim9 refactoring
          to improve maintenance and readability
          (Ubaldo Tiberi)

List of Changes and the Reasoning Behind Them:

1) Introduction of InitScriptVariables() Function:

Reasoning: This function has been introduced to ensure that when you open and
close Termdebug, and then open it again, there are no leftover script variable
values from the previous session. Leftover values could potentially cause
issues. The goal is for each Termdebug session to be independent of previous
sessions. At startup, all script variables are initialized. The only exception
is g:termdebug_loaded located at the very beginning of the script to prevent
sourcing the script twice. The variables are declared at script level and
defined in InitScriptVariables().

2) More Descriptive Variable Names:

Reasoning: The names of variables have been made more comprehensive. Almost
every Termdebug buffer now has a variable to indicate its name and another
variable to indicate its number, improving code readability and
maintainability. Due to the latest discussion around the &mousemodel option
save/restore mechanism, perhaps some other variables shall be prepended with
saved_.

3) Consistent Naming for GDB Terminal Buffers:

Reasoning: The name of the GDB terminal buffer now matches the name of the GDB
program being used, e.g., 'gdb', 'mygdb', 'arm-eabi-none-gdb', etc. This
ensures clarity and consistency in identifying buffers.

4) Other minor improvements:
Moved EchoErr() on top, added another test, some refactoring, mainly changed
several 0 and 1 to true and false

closes: #14980

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0482
2024-06-13 19:23:07 +02:00
Christian Brabandt
1a946044fe
runtime(doc): correct return types for job_start() and job_status()
fixes: #14982

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 19:13:28 +02:00
dkearns
a3bddb759e
runtime(vim): Update base-syntax, match :catch and :throw args (#14989)
Match :catch /{pattern}/ and :throw {expr1}.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:48:10 +02:00
Aliaksei Budavei
902b766858
runtime(java): Include element values in non-marker annotations (#14979)
Make a formal definition for normal and single-element kinds
of annotations that otherwise require for their containment
to repeat each time all syntax groups that describe element
values.

Reference:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.7

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:30:09 +02:00
Ernie Rael
a78eb25db3
patch 9.1.0481: Vim9: term_getjob() throws an exception on error
Problem:  Vim9: term_getjob() throws an exception on error
Solution: Return null_job instead, when there is no job
          (Ernie Rael)

closes: #14984

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0481
2024-06-13 17:24:54 +02:00
glepnir
1c29602662
patch 9.1.0480: fuzzy string matching executed when not needed
Problem:  fuzzy string matching executed when not needed
Solution: when no leader is available, can skip fuzzy logic, so return
          early (glepnir)

closes: #14986

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0480
2024-06-13 17:21:24 +02:00
zeertzjq
2f95ca9fce
patch 9.1.0479: fuzzy_match_str_with_pos() does unnecessary list operations
Problem:  fuzzy_match_str_with_pos() does unnecessary list operations.
Solution: Use fuzzy_match() directly (zeertzjq).

closes: #14987

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0479
2024-06-13 17:14:27 +02:00
zeertzjq
d353d27820
runtime(doc): restore description of "$" in col() and virtcol() (#14981)
These are different from line() and getpos().

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:00:25 +02:00
zeertzjq
02f3ebacfb
runtime(doc): deduplicate getpos(), line(), col(), virtcol()
Move the main description to getpos() and link to that from the other
functions.

closes: #14970

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 21:04:10 +02:00
Doug Kearns
31441d509a
runtime(vim): Update g:vimsyn_comment_strings dump file tests
Leading whitespace is no longer matched as part of the line comment as
of #13936.

closes: #14971

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 20:44:10 +02:00
Yegappan Lakshmanan
83d0028026
runtime(termdebug): Use string interpolation instead of string concat
closes: #14972

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 20:37:05 +02:00
glepnir
7c57940e3b
patch 9.1.0478: potential deref of NULL pointer in fuzzy_match_str_with_pos
Problem:  potential deref of NULL pointer in fuzzy_match_str_with_pos()
          on cleanup (after v9.1.0476)
Solution: Only free the pointer if it is non-NULL (glepnir)

closes: #14973

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0478
2024-06-12 20:31:13 +02:00
Christian Brabandt
1fb9eae579
patch 9.1.0477: block_editing errors out when using <enter>
Problem:  block_editing errors out when using <enter>
          (Ali Rizvi-Santiago, after v9.1.0274)
Solution: Change ins_len from size_t to int so that the test
          if ins_len is negative actually works properly

Add a test, so that this doesn't regress.

fixes: #14960

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0477
2024-06-11 20:37:59 +02:00
dkearns
959c3c887b
runtime(vim): Update base-syntax, configurable comment string highlighting (#14931)
Allow highlighting of strings within comments to be disabled by setting
g:vimsyn_comment_strings to false.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 20:18:08 +02:00
Ken Takata
b4e648a006
runtime(doc): fix typos in syntax.txt
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:45:53 +02:00
glepnir
40c1c3317d
patch 9.1.0476: Cannot see matched text in popup menu
Problem:  Cannot see matched text in popup menu
Solution: Introduce 2 new highlighting groups: PmenuMatch and
          PmenuMatchSel (glepnir)

ping @habamax, @neutaaaaan @romainl because vim/colorschemes may need
some updates, @lifepillar for updating vim-colortemplate

closes: #14694

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0476
2024-06-11 19:40:50 +02:00
dkearns
059cbe8933
runtime(vim): Update base-syntax, match multiline continued comments (#13936)
Match multiline (continued) line comments.

Continued tail comments are not supported yet.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:27:53 +02:00
Peter Aronoff
210b39c2d6
runtime(doc): clarify documentation for "v" position at line()
Problem: the previous documentation falsely states that "v" always
refers to the start of a visual area.  In fact, the reference of "v" and
"." complement each other.  If the cursor is at the start of
a (characterwise) visual area, then "v" refers to the end of the area.

Solution: be more verbose and explicit about the connection between "."
and "v" and also refer to |v_o| which many vim users will be familiar
with for visual areas.

Signed-off-by: Peter Aronoff <peter@aronoff.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:23:08 +02:00
Yegappan Lakshmanan
4877cb411f
patch 9.1.0475: cmod_split modifier is always reset in term_start()
Problem:  cmod_split modifier is always reset in term_start()
Solution: only clear the WSP_VERT flag, if it is not already in
          cmdmod.cmod_split (Yegappan Lakshmanan)

closes: #14961

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0475
2024-06-11 19:18:12 +02:00
Yegappan Lakshmanan
971378eed9
runtime(termdebug): remove line-continuation characters
Those are no longer needed for Vim9.

related: #14961

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:17:36 +02:00
Yinzuo Jiang
2e3b2a8d89
runtime(kdl): use shiftwidth() instead of &tabstop in indent script
closes: #14962

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:07:16 +02:00
dkearns
6ea3dfe8de
runtime(vim): Remove orphaned screen dump files (#14965)
These are no longer generated by the current test input files.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:04:46 +02:00
inzuo Jiang
2d88210b3c
runtime(kdl): include syntax, indent and ftplugin files
closes: #14956

Co-authored-by: Aram Drevekenin <aram@poor.dev>
Signed-off-by: inzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 21:13:56 +02:00
Christian Brabandt
d03882baac
patch 9.1.0474: CI: Test_ColonEight() fails on github runners
Problem:  CI: Test_ColonEight() fails on github runners
          (Ken Takata)
Solution: Run the test for files on the C: drive, where dos shortnames
          are still enabled, refactor the tests to use a single setup
          function for the preparation

fixes: #14954
closes: #14958

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0474
2024-06-10 21:06:55 +02:00
Kentaro Hayashi
b8076f92a1
runtime(deb822sources): add missing Enabled field in syntax script
closes: #14898

It lacks the support of Enabled: boolean option field [1]:

e.g.

  Types: deb
  Uris: https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/
  Components: main
  Suites: vscodium
  Architectures: amd64 i386 arm64 armhf
  Enabled: yes
  Signed-By: /var/lib/extrepo/keys/vscodium.asc

This patch was also forwarded to upstream. [2]

[1] https://manpages.debian.org/unstable/apt/sources.list.5.en.html#DEB822-STYLE_FORMAT
[2] https://salsa.debian.org/vim-team/vim-debian/-/merge_requests/16

Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 18:22:31 +02:00
Igor
7e9a1a75b8
runtime(svelte): basic svelte ftplugin file
closes: #14949

Signed-off-by: Igor <igorlfs@ufmg.br>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 18:20:04 +02:00
Yegappan Lakshmanan
d603e95609
patch 9.1.0473: term_start() does not clear vertical modifier
Problem:  term_start() does not clear vertical modifier
Solution: Clear the flag after splitting the window
          (Yegappan Lakshmanan)

closes: #14953

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0473
2024-06-10 18:16:34 +02:00
Ernie Rael
dfc21db0b0
runtime(termdebug): fix mousemodel restoration by comparing against null_string
closes: #14951

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 18:12:07 +02:00
Ubaldo Tiberi
c593b9ead9
runtime(doc): Added definitions of Vim scripts and plugins
closes: #14935

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 18:48:08 +02:00
Aliaksei Budavei
d6b4afb636
runtime(java): Exclude lambda expressions from _when_ _switch-case_ label clauses (#14945)
These guard clauses are always boolean expressions, whereas
lambda expressions can only appear in either an assignment,
a casting, or an invocation context.

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-14.html#jls-14.11.1
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.27

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 18:39:52 +02:00
laburnumT
477402ecf9
runtime(termdebug): Fix saved_mousemodel check
Fix issue introduced by 23f29ffc64276dd790581f98b86a0a6435b7eb22 where
saved_mousemodel is introduced as a variable, so the exists check will
always be true.

Move to check the value of saved_mousemodel instead.

closes: #14946

Signed-off-by: laburnumT <laburnumtec@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 18:38:37 +02:00
zeertzjq
aa925eeb97
patch 9.1.0472: Inconsistencies between functions for option flags
Problem:  Inconsistencies between functions for option flags.
Solution: Consistently use "unsigned int" as return type and rename
          get_bkc_value() to get_bkc_flags() (zeertzjq).

closes: #14925

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0472
2024-06-09 18:24:05 +02:00