0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00
Commit Graph

19673 Commits

Author SHA1 Message Date
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 23f29ffc64 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
zeertzjq
2d1d5c6c27 patch 9.1.0471: Crash when using autocmd_get() after removing event inside autocmd
Problem:  Crash when using autocmd_get() after removing event inside
          autocmd (Sergey Vlasov)
Solution: Check that the pattern is NULL (zeertzjq).

fixes: #14937
closes: #14939

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0471
2024-06-09 16:44:33 +02:00
Yegappan Lakshmanan
03a3df15ca runtime(termdebug: Fix errors in using the latest termdebug.vim
closes: #14941

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 16:42:45 +02:00
h-east
9c4389acc3 runtime(doc): Fix small style issues
closes: #14942

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 16:32:48 +02:00
Christian Brabandt
5674c9a7de runtime(doc): add return type info for Vim function descriptions
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 00:19:16 +02:00
Antonio Giovanni Colombo
4032daaa11 translation(it): Update Italian Vim manpage
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-07 13:32:22 +02:00
Christian Brabandt
6dcd7f1a4d runtime(man): disable the q mapping
fixes: #8210

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-06 19:27:17 +02:00
Luc Hermitte
ce47d32b03 runtime(cpp): Change 'cms' for C++ to '// %s'
fixes: #14911
closes: #14926

Signed-off-by: Luc Hermitte <luc.hermitte@csgroup.eu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-06 18:44:52 +02:00
Lars T. Kyllingstad
d9ec676911 runtime(ccomplete): fix type mismatch error
fixes: #14927
closes: #14928

Signed-off-by: Lars T. Kyllingstad <lars.kyllingstad@sintef.no>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-06 18:39:03 +02:00
Christian Brabandt
ae4641d68e runtime(termdebug): Fix wrong email address
related: #14903

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 22:24:24 +02:00
Ubaldo Tiberi
23f29ffc64 runtime(termdebug): convert termdebug plugin to Vim9 script
closes: #14903

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 21:37:53 +02:00
Christian Brabandt
7cbed350f8 patch 9.1.0470: tests: Test_ColonEight_MultiByte() fails sporadically
Problem:  tests: Test_ColonEight_MultiByte() fails on MS-Windows
Solution: mark test as flaky

This single line change should have happened as part of v9.1.469 (and I
mentioned it in the Commit message), but forgot to actually include the
change :facepalm

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0470
2024-06-05 20:34:55 +02:00
zeertzjq
529b9ad62a patch 9.1.0469: Cannot have buffer-local value for 'completeopt'
Problem:  Cannot have buffer-local value for 'completeopt'
          (Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).

Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.

fixes: #5487
closes: #14922

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0469
2024-06-05 20:27:06 +02:00
David Wagner
84d9611b67 patch 9.1.0468: GvimExt does not consult HKEY_CURRENT_USER
Problem:  GvimExt does not consult HKEY_CURRENT_USER
Solution: Make GvimExt first consult HKEY_CURRENT_USER and then fall
          back to HKEY_LOCAL_MACHINE to find gvim (David Wagner)

fixes: #14904
closes: #14917

Signed-off-by: David Wagner <dwagner@rydia.us>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0468
2024-06-05 20:01:19 +02:00
Philip H
9c60890518 CI: update FreeBSD runner to 14.1 (#13937)
closes: #14918

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 19:57:48 +02:00
zeertzjq
551d8c372e patch 9.1.0467: typos in some comments
Problem:  typos in some comments
          (after v9.1.0466)
Solution: fix comments
          (zeertzjq)

closes: #14919

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0467
2024-06-05 19:53:32 +02:00
Doug Kearns
92f4e91590 runtime(vim): Update base-syntax, allow whitespace before :substitute pattern
Allow whitespace between the :substitute command and its pattern
argument.  Although unusual, it is supported and there are examples in
the wild.

Match Vi compatible :substitute commands like :s\/{string}/.  See :help
E1270.

fixes: #14920
closes: #14923

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 19:47:04 +02:00
glepnir
dca57fb542 patch 9.1.0466: Missing comments for fuzzy completion
Problem:  Missing comments for fuzzy completion (after 9.1.0463)
Solution: Add more comments, adjust indentation slightly
          (glepnir)

closes: #14910

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0466
2024-06-04 22:01:21 +02:00
Christian Brabandt
ce6fe84db2 runtime(man): update Vim manpage
fixes: #14916

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 21:58:32 +02:00
Christian Brabandt
98fb81846d runtime(comment): clarify the usage of 'commentstring' option value
fixes: #14905

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 20:59:08 +02:00
Christian Brabandt
2a2c4fffd7 runtime(doc): clarify how fuzzy 'completeopt' should work
related: #14912

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 20:27:18 +02:00
Christian Brabandt
98b73eb645 runtime(netrw): prevent accidental data loss
fixes: #14915

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 18:18:16 +02:00
Shougo Matsushita
60c8743ab6 patch 9.1.0465: missing filecopy() function
Problem:  missing filecopy() function
Solution: implement filecopy() Vim script function
          (Shougo Matsushita)

closes: #12346

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0465
2024-06-03 23:01:40 +02:00
Riley Bruins
0a0830624a patch 9.1.0464: no whitespace padding in commentstring option in ftplugins
Problem:  no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
          existing filetype plugins with the new default value
          (Riley Bruins)

closes: #14843

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0464
2024-06-03 20:40:45 +02:00
glepnir
a218cc6cda patch 9.1.0463: no fuzzy-matching support for insert-completion
Problem:  no fuzzy-matching support for insert-completion
Solution: enable insert-mode completion with fuzzy-matching
          using :set completopt+=fuzzy (glepnir).

closes: #14878

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0463
2024-06-03 19:46:13 +02:00
Yegappan Lakshmanan
734286e4c6 patch 9.1.0462: eval5() and eval7 are too complex
Problem:  eval5() and eval7 are too complex
Solution: Refactor eval5() and eval7() in eval.c
          (Yegappan Lakshmanan)

closes: #14900

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0462
2024-06-03 18:52:22 +02:00
John Marriott
f51ff96532 patch 9.1.0461: too many strlen() calls in drawline.c
Problem:  too many strlen() calls in drawline.c
Solution: Refactor code to avoid strlen()
          (John Marriott)

closes: #14890

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0461
2024-06-02 19:44:11 +02:00
İlyas Akın
7577afd5ef patch 9.1.0460: filetype: lintstagedrc files are not recognized
Problem:  filetype: lintstagedrc files are not recognized
Solution: recognize '.lintstagedrc' files as json filetype
          (İlyas Akın)

see: https://github.com/lint-staged/lint-staged

closes: #14897

Signed-off-by: İlyas Akın <ilyas.akin@kuika.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0460
2024-06-02 16:57:00 +02:00
nwounkn
36b6676719 patch 9.1.0459: Vim9: import autoload does not work with symlink
Problem:  Vim9: import autoload does not work with symlink
          (Olivier Dormond)
Solution: set sn_autoload_prefix in check_script_symlink
          (nwounkn)

fixes: #14775
closes: #14885

Signed-off-by: nwounkn <nwounkn@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0459
2024-06-02 16:10:07 +02:00
Christian Brabandt
7737ce519b patch 9.1.0458: Coverity complains about division by zero
Problem:  Coverity complains about division by zero
Solution: Check explicitly for sw_val being zero

Shouldn't happen, since tabstop value should always be larger than zero.
So just add this as a safety measure.

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0458
2024-06-02 16:04:43 +02:00
Christian Brabandt
e5bc2e4bc9 patch 9.1.0457: tests: test_gui fails on Wayland
v:windowid is set in GUI buils with Wayland

Problem:  tests: test_gui fails on Wayland
          (after: 9.1.0064, Gary Johnson)
Solution: drop the "empty($WAYLAND_DISPLAY)" condition in the test

fixes: #14886

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0457
2024-06-01 20:59:14 +02:00
Gary Johnson
88d4f255b7 patch 9.1.0456: Left shift is incorrect with vartabstop and shiftwidth=0
Problem:  Left shift is incorrect with vartabstop and shiftwidth=0
Solution: make tabstop_at() function aware of shift direction
          (Gary Johnson)

The problem was that with 'vartabstop' set and 'shiftwidth' equal 0,
left shifts using << were shifting the line to the wrong column.  The
tabstop to the right of the first character in the line was being used
as the shift amount instead of the tabstop to the left of that first
character.

The reason was that the tabstop_at() function always returned the value
of the tabstop to the right of the given column and was not accounting
for the direction of the shift.

The solution was to make tabstop_at() aware of the direction of the
shift and to choose the tabtop accordingly.

A test was added to check this behavior and make sure it doesn't
regress.

While at it, also fix a few indentation/alignment issues.

fixes: #14864
closes: #14887

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0456
2024-06-01 20:51:33 +02:00
Christian Brabandt
e299591498 runtime(doc): clarify 'shortmess' flag "S"
fixes: #14893

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-01 20:43:47 +02:00
Mike Williams
16b63bd002 patch 9.1.0455: MS-Windows: compiler warning for size_t to int conversion
Problem:  MS-Windows: compiler warning for size_t to int conversion
Solution: Add a few type casts to resolve warning on Windows
          (Mike Williams)

closes: #14884

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0455
2024-06-01 11:33:40 +02:00
Christian Brabandt
bad9577b9a runtime(doc): include some vim9 script examples in the help
closes: #14848

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-31 15:09:42 +02:00