1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-04-07 18:36:44 +02:00
Commit graph

20274 commits

Author SHA1 Message Date
zeertzjq
5df3cb2898
patch 9.1.0765: No test for patches 6.2.418 and 7.3.489
Problem:  No test for patches 6.2.418 and 7.3.489
Solution: Add a test.  Fix some whitespace problems in test_mapping.vim.
          Document the behavior (zeertzjq).

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 21:05:06 +02:00
Andreas Schneider
4f51f3a573
runtime(spec): set comments and commentstring options
closes: 

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 21:02:10 +02:00
K.Takata
48f3833ff0
NSIS: Include libgcc_s_sjlj-1.dll again
gettext-iconv-windows v0.22.5a-v1.17 requires libgcc_s_sjlj-1.dll again.
Add a new option ${INCLUDE_LIBGCC} to control whether it should be
included in the package.

This partly reverts 49f1e1979f.

Related: https://github.com/vim/vim-win32-installer/pull/355

closes: 

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 20:37:00 +02:00
Christian Brabandt
fd4e47e06b
runtime(doc): clarify the effect of 'startofline' option
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 18:02:45 +02:00
Christian Brabandt
51b62387be
patch 9.1.0764: [security]: use-after-free when closing a buffer
Problem:  [security]: use-after-free when closing a buffer
Solution: When splitting the window and editing a new buffer,
          check whether the newly to be edited buffer has been marked
          for deletion and abort in this case

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-rj48-v4mq-j4vg

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 17:36:31 +02:00
Doug Kearns
818c641b6f
runtime(vim): Update base-syntax file, improve class, enum and interface highlighting
- Enable folding of class, enum and interface declarations.
- Highlight constructor names with the Function highlight group, like
  other special methods.
- Mark function definitions using special method names as errors.
- Highlight :type arguments.

fixes: #14393#issuecomment-2042796198.
closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 17:00:48 +02:00
Aliaksei Budavei
ec0229414b
patch 9.1.0763: tests: cannot run single syntax tests
Problem:  tests: cannot run single syntax tests
Solution: Support running a subset of syntax tests
          (Aliaksei Budavei)

Two methods of assembling a subset of test filenames for
selection are provided:

* Filename and filetype Make targets will be generated, and
  multiple such targets can be passed before the mandated
  trailing "test" target, e.g. "make html markdown test".

* Filenames and their parts can be specified as a regular
  expression that is assigned to a "VIM_SYNTAX_TEST_FILTER"
  environment variable, and used with the test Make target,
  e.g. "VIM_SYNTAX_TEST_FILTER=html\\\|markdown make test".
  (This variable will be ignored and the whole suite will be
  run when Make is GNU Make and a parent Makefile is used.)

Methods can be used alone or together, with the Make targets
having the higher precedence. Neither method will influence
the order of test execution.

closes: 

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:57:33 +02:00
Milly
a9c6f90918
patch 9.1.0762: 'cedit', 'termwinkey' and 'wildchar' may not be parsed correctly
Problem:  'cedit', 'termwinkey' and 'wildchar' may not be parsed
          correctly
Solution: improve string_to_key() function in option.c
          (Milly)

- Problem: `^@` raises an error.
  Solution: Store as `<Nul>`.
- Problem: `<t_xx` does not raise an error.
  Solution: Raise an error if closing `>` is missing.
- Problem: Single `<` or `^` raises an error. It is inconvenient for users.
  Solution: They are stored as a single character.

closes: 

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:47:02 +02:00
Christian Brabandt
1a31c430bb
patch 9.1.0761: :cd completion fails on Windows with backslash in path
Problem:  :cd completion fails on Windows with backslash in path
Solution: switch no_bslash argument to FALSE in file_pat_to_reg_pat()

Note: only fixes the problem on Windows. For Unix, we still need to
escape backslashes since those are taken as regex atoms (and could be
invalid regex atoms).

fixes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:34:20 +02:00
Milly
d4ad4c9b3e
patch 9.1.0760: tests: no error reported, if gen_opt_test.vim fails
Problem:  tests: no error reported, if gen_opt_test.vim fails
Solution: Make Vim exit with return code 1 in case of any error
          (Milly)

closes: 

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:27:28 +02:00
Christian Brabandt
b065a10e24
patch 9.1.0759: screenpos() may return invalid position
Problem:  screenpos() may return invalid position
          after switching buffers (Greg Hurrell)
Solution: reset w_leftcol if wrapping has been set
          after copying wrap option

fixes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:30:22 +02:00
Konfekt
7c3f9af0ed
runtime(misc): unset compiler in various ftplugins
just to foster best practices

closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:26:46 +02:00
Milly
89872f58a9
runtime(doc): update formatting and syntax
closes: 

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:16:18 +02:00
Konfekt
af449f69c7
runtime(compiler): add cppcheck linter compiler plugin
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:09:21 +02:00
h-east
738ebfea41
runtime(doc): Fix style in documents
closes: 

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 16:56:47 +02:00
h-east
8ee0e0b8e3
runtime(doc): Fix to two-space convention in user manual
closes: 

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 16:44:27 +02:00
Konfekt
7b27fc49a8
runtime(comment): consider &tabstop in lines after whitespace indent
The count `strlen()` in

```vim
line = printf(indent_start .. substitute(cms, '%s\@!', '%%', 'g'),
                       strpart(getline(lnum), strlen(indent_start)))
```

is too large if the block of lines to be operated on contains different
whitespace indenting (tab vs. spaces).

Considering using `2gcc` on the first line with 4 spaces as indenting
and on the next line using a single tab character (with &tabstop value
of 8):

Using `strlen(indent_start) = 4` for an initial indent of 4 spaces is
correct for the first line, but wrong for the next line and will
therefore wrongly comment out the tab-indented line (and possibly
deleting some content).

The new check is still too simple because it assumes that as soon as
there's a tab the whole indent is made of tabs; it's a start of entering
the mixed tab and whitespace indent rabbit hole.

fixes: 
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 16:19:40 +02:00
Milly
40c6babc17
patch 9.1.0758: it's possible to set an invalid key to 'wildcharm'
Problem:  it's possible to set an invalid key to 'wildcharm'
Solution: error out, if the 'wildcharm' value is an invalid key
          (Milly)

closes: 

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-04 20:41:14 +02:00
Aliaksei Budavei
60310a4b26
runtime(java): Manage circularity for every :syn-included syntax file
With "g:markdown_fenced_languages" defined and "java" added
to its list, a circular dependency between the Markdown and
Java syntax files will be made.  To break it, no Markdown
documentation comments will be recognised in fenced blocks
in Markdown files; in order to view Java source files,
"java" must be removed from "g:markdown_fenced_languages",
and this task can be automated as follows.

1) Add to "~/.after/ftplugin/java.vim":
------------------------------------------------------------
if exists("g:markdown_fenced_languages") &&
	\ !(exists("g:java_ignore_javadoc") ||
	\ exists("g:java_ignore_markdown"))
    let s:idx = index(g:markdown_fenced_languages, 'java')
    if s:idx > -1
	call remove(g:markdown_fenced_languages, s:idx)
    endif
    unlet s:idx
endif
------------------------------------------------------------

2) Optionally add to "~/.after/ftplugin/markdown.vim":
------------------------------------------------------------
if exists("g:markdown_fenced_languages") &&
	\ index(g:markdown_fenced_languages, 'java') < 0
    call add(g:markdown_fenced_languages, 'java')
endif
------------------------------------------------------------

(Make sure that the above snippets appear in the files under
the "ftplugin" NOT "syntax" directory.)

Finally, unless the new version of the syntax file is made
available from "$VIMRUNTIME" (and from "~/.vim/syntax" if
necessary), OTHER discoverable file versions will be used
whose behaviour may interfere with this fix.

related: 
closes: 

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-04 20:25:05 +02:00
Christian Brabandt
075ab5ab3b
patch 9.1.0757: tests: messages files contains ANSI escape sequences
Problem:  tests: messages files contains ANSI escape sequences
Solution: filter those out in runtests.vim

Also, since we are setting $LC_ALL, we don't need to set $LANG and
$LANGUAGE since those are overridden by $LC_ALL anyhow.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-03 16:38:52 +02:00
glepnir
a6d9e3c4e0
patch 9.1.0756: missing change from patch v9.1.0754
Problem:  missing change from patch v9.1.0754
Solution: use correct width for the actual item
          in pum_redraw() (glepnir)

closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-03 11:01:19 +02:00
Austin Chang
2982299699
patch 9.1.0755: quickfix list does not handle hardlinks well
Problem:  quickfix list does not handle hardlinks well
Solution: store original file name with quickfix entry
          (Austin Chang)

Quickfix list shows entries with duplicate name if the file is opened
with the path of hard links.

The major cause is that qflist assumed that the filename passed into
`qf_add_entry` matches the filename opened with the buffer.

This patch handles this case by introduce a `qf_fname` into `qfline_S`
structure. It stores the filename from `qf_add_entry` for each quickfix
line.

closes: 

Signed-off-by: Austin Chang <austin880625@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-03 10:56:31 +02:00
Milly
ae62fe5c28
runtime(doc): 'filetype', 'syntax' and 'keymap' only allow alphanumeric + some characters
closes: 

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-02 19:36:03 +02:00
Konfekt
f416a2220f
runtime(systemd): small fixes to &keywordprg in ftplugin
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-02 19:28:44 +02:00
Philip H.
5d64e28011
CI: macos-12 runner is being sunset, switch to 13
See: https://github.com/actions/runner-images/issues/10721

closes: 

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-02 19:21:52 +02:00
glepnir
6a89c94a9e
patch 9.1.0754: fixed order of items in insert-mode completion menu
Problem:  fixed order of items in insert-mode completion menu
Solution: Introduce the 'completeitemalign' option with default
          value "abbr,kind,menu" (glepnir).

Adding an new option `completeitemalign` abbr is `cia` to custom
the complete-item order in popupmenu.

closes: 
closes: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 20:32:12 +02:00
Konfekt
e021f39b79
runtime(comment): commenting might be off by one column
getpos columns start at 1 and not 0 as do arrays

closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 20:02:15 +02:00
zeertzjq
47f8584a80
patch 9.1.0753: Wrong display when typing in diff mode with 'smoothscroll'
Problem:  Wrong display when typing in diff mode with 'smoothscroll'.
Solution: Use adjust_plines_for_skipcol() (zeertzjq).

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 19:35:47 +02:00
Milly
25732435c5
patch 9.1.0752: can set 'cedit' to an invalid value
Problem:  can set cedit to an invalid value
Solution: Check that the value is a valid key name
          (Milly)

closes: 

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 19:33:39 +02:00
dundargoc
baee8448d1
runtime(doc): add usr tag to usr_toc.txt
When typing `:h usr` it redirects to usr_01.txt, but I'd argue
usr_toc.txt is more useful as you can see an overview of all manuals.
When I usr `:h usr` I personally always intend to go to `usr_toc`.

closes: 

Signed-off-by: dundargoc <gocdundar@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 19:24:02 +02:00
Christian Brabandt
b50bc9ad55
patch 9.1.0751: Error callback for term_start() not used
Problem:  Error callback for term_start() not used
          (darkseid-is)
Solution: attach pipe to stderr if an error callback exists

fixes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 21:29:43 +02:00
Nir Lichtman
563e8ec8c7
patch 9.1.0750: there are some Win9x legacy references
Problem:  there are some Win9x legacy references
Solution: Remove those mentions (Nir Lichtman)

closes: 

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:42:28 +02:00
Aliaksei Budavei
85f054aa3f
runtime(java): Recognise the CommonMark form (///) of Javadoc comments
Complement "g:java_ignore_javadoc" with "g:java_ignore_html"
and "g:java_ignore_markdown" to allow selectively disabling
the recognition of HTML and CommonMark respectively.

(Note that this is not a preview feature.)

======================== LIMITATION ========================

According to the syntactical details of JEP 467:

> Any leading whitespace and the three initial / characters
> are removed from each line.
>
> The lines are shifted left, by removing leading whitespace
> characters, until the non-blank line with the least
> leading whitespace has no remaining leading whitespace.
>
> Additional leading whitespace and any trailing whitespace
> in each line is preserved, because it may be significant.

the following example:
------------------------------------------------------------
///    A summary sentence.
///     A list:
///      - Item A.
///     - Item B.
///
///     Some code span, starting here `
///      1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

should be interpreted as if it were written thus:
------------------------------------------------------------
///A summary sentence.
/// A list:
///  - Item A.
/// - Item B.
///
/// Some code span, starting here `
///  1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

Since automatic line rewriting will not be pursued, parts of
such comments having significant whitespace may be ‘wrongly’
highlighted.  For convenience, a &fex function is defined to
‘correct’ it: g:javaformat#RemoveCommonMarkdownWhitespace()
(:help ft-java-plugin).

References:
https://openjdk.org/jeps/467
https://spec.commonmark.org/0.31.2

closes: 

Co-authored-by: Tim Pope <code@tpope.net>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:40:04 +02:00
Riley Bruins
de6c1d1182
patch 9.1.0749: filetype: http files not recognized
Problem:  filetype: http files not recognized
Solution: detect '*.http' as http filetype, include
          http filetype plugin (Riley Bruins)

Based on the specification found
[here](https://github.com/JetBrains/http-request-in-editor-spec/blob/master/spec.md)

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:34:04 +02:00
Konfekt
0fb25515cc
runtime(comment): fix syntax error
fixes: 
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:30:34 +02:00
Aliaksei Budavei
5dd4ec0089
CI: uploading failed screendump tests does not work Cirrus
Problem:  CI: uploading failed screendump tests does not work Cirrus
          (after: e019f3626d)
Solution: Do not use the $CIRRUS_WORKING_DIR env variable

related: 

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 17:29:39 +02:00
Doug Kearns
ea84202372
patch 9.1.0748: :keep* commmands are sometimes misidentified as :k
Problem:  The :keep{alt,jumps,marks,patterns} commmands are sometimes
          misidentified as :k.
Solution: Make sure one_letter_cmd() only returns true for :k and not
          other :keep* commands (Doug Kearns).

This currently manifests as missing completion for :keep* commands and
incorrect results from fullcommand().

E.g., fullcommand("keepmarks") returns "k" rather than "keepmarks".

The correct command, however, is executed as command modifiers are
handled specially in do_one_cmd() rather than using find_ex_command().

Fix exists(':k') so that it returns 2 for a full match.

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 17:17:41 +02:00
John M Devin
ee20fc8062
runtime(indent): allow matching negative numbers for gnu indent config file
Some gnu indent options take negative numbers (e.g. --indent-label).
Add matching for an optional single '-' before the number.

closes: 

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 11:18:42 +02:00
Konfekt
9142136161
runtime(comment): add gC mapping to (un)comment rest of line
fixes: 
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:48:40 +02:00
zeertzjq
8feed3a525
patch 9.1.0747: various typos in repo found
Problem:  various typos in repo found
Solution: Fix typos (zeertzjq)

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:37:47 +02:00
zeertzjq
fa117387ee
patch 9.1.0746: tests: Test_halfpage_longline() fails on large terminals
Problem:  Test_halfpage_longline() fails on large terminals
          (lazypingu)
Solution: Use a window with known width (zeertzjq).

fixes: 
closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:16:18 +02:00
hokorobi
6db3fc5632
runtime(doc): reformat gnat example
closes: 

Signed-off-by: hokorobi <hokorobi.hokorobi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:10:51 +02:00
hokorobi
c3989f184d
runtime(doc): reformat ada_standard_types section
closes: 

Signed-off-by: hokorobi <hokorobi.hokorobi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:08:40 +02:00
Wu, Zhenyu
8a2aea8a62
patch 9.1.0745: filetype: bun and deno history files not recognized
Problem:  filetype: bun and deno history files not recognized
Solution: detect '.bun_repl_history' and 'deno_history.txt' as
          javascript filetype (Wu, Zhenyu)

closes: 

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:03:19 +02:00
Aliaksei Budavei
7cd6edf2b7
runtime(glvs): Correct the tag name of glvs-autoinstal
closes: 

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 09:50:52 +02:00
Christian Brabandt
998f018df3
runtime(doc): include short form for :earlier/:later
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 09:48:19 +02:00
Ben Scuron
1678ca36c8
runtime(doc): remove completed TODO
Completed in commit: c81dfaa69c
(Patch 9.0.1621)

closes: 

Signed-off-by: Ben Scuron <bscuron19@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 09:42:42 +02:00
Julio B
1a2870b57a
patch 9.1.0744: filetype: notmuch configs are not recognised
Problem:  filetype: notmuch configs are not recognised
Solution: Detect more notmuch profile configuration files
          as dosini filetype (Julio B)

Reference:
https://notmuchmail.org/doc/latest/man1/notmuch-config.html#configuration

closes: 

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:22:34 +02:00
Yukihiro Nakadaira
06fe70c183
patch 9.1.0743: diff mode does not handle overlapping diffs correctly
Problem:  diff mode does not handle overlapping diffs correctly
Solution: correct the logic to handle overlapping blocks
          (Yukihiro Nakadaira)

Vim merges overlapped diff blocks and it doesn't work expectedly
in some situation.

closes: 

Signed-off-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:19:42 +02:00
GuyBrush
c854efc6fe
runtime(glvs): fix a few issues
Fix errors on  that:
* led to use the wrong vim runtime directory name if using powershell or
  bash on windows.
* use a wrong pattern to detect the users runtime dir
* allow to use global variables to specify un-archive commands

closes: 

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:14:08 +02:00