0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

21079 Commits

Author SHA1 Message Date
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
Christian Brabandt
f3dd6f617c
patch 9.1.0454: minor issues in test_filetype with rasi test
Problem:  minor issues in test_filetype with rasi test
          (after 9.1.0453)
Solution: re-sort test_filetype, fix wrong syntax.txt help tags

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0454
2024-05-31 12:26:12 +02:00
Pierrick Guillaume
280e5b13ca
patch 9.1.0453: filetype: rasi files are not recognized
Problem:  filetype: rasi files are not recognized
Solution: regonize '*.rasi' files as rasi filetype,
          include a filetype and syntax plugin
          (Pierrick Guillaume)

ported from: https://github.com/Fymyte/rasi.vim

closes: #14821

Signed-off-by: Pierrick Guillaume <pierguill@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0453
2024-05-31 12:00:49 +02:00
Aliaksei Budavei
7129f2ad2f
runtime(java): Improve the matching of lambda expressions (#14880)
- Distinguish some formal parameters.
- Support multi-line definitions.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-31 11:11:34 +02:00
youcai
1acc67ac44
patch 9.1.0452: Configure checks for libelf unnecessarily
Problem:  Configure checks for libelf unnecessarily
Solution: Remove configure check (youcai)

closes: #14879

Signed-off-by: youcai <omegacoleman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0452
2024-05-30 19:31:36 +02:00
zeertzjq
88c8c547d5
patch 9.1.0451: No test for escaping '<' with shellescape()
Problem:  No test for escaping '<' with shellescape()
Solution: Add a test.  Use memcpy() in code to make it easier to
          understand.  Fix a typo (zeertzjq).

closes: #14876

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0451
2024-05-30 19:27:25 +02:00
Christian Brabandt
32a5faa6d7
check.vim complains about overlong comment lines
Problem:  check.vim complains about overlong comment lines
Solution: only check the length of non-commented lines

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 09:51:47 +02:00
Antonio Giovanni Colombo
ed43711b66
translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 09:49:40 +02:00
Yegappan Lakshmanan
51c45e89b5
patch 9.1.0450: evalc. code too complex
Problem:  eval.c code too complex
Solution: refactor eval6() and eval9() functions into several smaller
          functions (Yegappan Lakshmanan)

closes: #14875

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0450
2024-05-30 07:52:44 +02:00
Mike Williams
51024bbc1a
patch 9.1.0449: MS-Windows: Compiler warnings
Problem:  MS-Windows: Compiler warnings
Solution: Resolve size_t to int warnings

closes: #14874

A couple of warnings in ex_docmd.c have been resolved by modifying their
function argument types, followed by some changes in various function
call sites.  This also allowed removal of some casts to cope with
size_t/int conversion.

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0449
2024-05-30 07:46:30 +02:00
Yegappan Lakshmanan
8904d672be
patch 9.1.0448: compiler warning in eval.c
Problem:  compiler warning in eval.c (after v9.1.0429)
Solution: refactor code (Yegappan Lakshmanan)

fixes: #14847
closes: #14867

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0448
2024-05-29 07:51:50 +02:00
zeertzjq
0b74eeceb8
runtime(stylus): remove remaining css code (#14866)
This seems to be a forgotten fixup in 2d919d2744 (r141568461)

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-28 07:23:41 +01:00
h-east
0bdc5d8241
runtime(doc): Add ft_hare.txt to Reference Manual TOC
while at it, also re-align ft_context.txt with the rest of the
list.

closes: #14863

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-27 17:14:17 +02:00
Christian Brabandt
393708cff6
runtime(vim): re-generate vim syntax from generator
related: #14861

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-27 15:50:07 +02:00
h_east
c984b2fd9d
runtime(vim): fix syntax vim bug (Close #14858) (#14861)
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-27 15:40:25 +02:00
glepnir
53387c55a1
patch 9.1.0447: completion may be wrong when deleting all chars
Problem:  completion may be wrong when deleting all chars
Solution: reset compl_shown_match

closes: #14854

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0447
2024-05-27 15:14:51 +02:00
zeertzjq
ef73374dc3
patch 9.1.0446: getregionpos() inconsistent for partly-selected multibyte char
Problem:  getregionpos() behaves inconsistently for a partly-selected
          multibyte char.
Solution: Always use column of the first byte for a partly-selected
          multibyte char (zeertzjq).

closes: #14851

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0446
2024-05-26 18:42:18 +02:00
Linda_pp
86071925ed
runtime(typescriptreact): fix highlighting nested and escaped quotes in string props (#14852)
Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-26 18:22:26 +02:00
Christian Brabandt
76174e7110
runtime(asm): remove the indent plugin since it has too many issues
fixes: #14791

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-26 18:04:19 +02:00
James McCoy
0076ddc07d
runtime(debian): update Debian runtime files (#14849)
* Add space in template for 'commentstring'
* Add 'comments' and 'commentstring' support to debcontrol
* debversions: Move Ubuntu releases outside of standard support to unsupported
  Although trust, xenial, and bionic are not EOL yet, their standard support period has ended.

Reported-by: Riley Bruins <ribru17@gmail.com>
Co-authored-by: Riley Bruins <ribru17@gmail.com>
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-25 20:56:49 +02:00
Yegappan Lakshmanan
dbac0da631
patch 9.1.0445: Coverity warning after 9.1.0440
Problem:  Coverity warning after 9.1.0440
Solution: Fix Coverity warning, add a test and
          reduce the calls to clear_tv()
          (Yegappan Lakshmanan).

closes: #14845

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0445
2024-05-25 20:23:54 +02:00
zeertzjq
dff55a3358
patch 9.1.0444: Not enough tests for getregion() with multibyte chars
Problem:  Not enough tests for getregion() with multibyte chars.
Solution: Add a few more tests (zeertzjq).

closes: #14844

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0444
2024-05-25 10:25:36 +02:00
zeertzjq
afc2295c22
patch 9.1.0443: Can't use blockwise selection with width for getregion()
Problem:  Can't use a blockwise selection with a width for getregion().
Solution: Add support for blockwise selection with width like the return
          value of getregtype() or the "regtype" value of TextYankPost
          (zeertzjq).

closes: #14842

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0443
2024-05-24 19:07:12 +02:00
rhysd
5e45715084
runtime(typescript): update outdated syntax files
fixes: #14721
fixes: HerringtonDarkholme/yats.vim#277
closes: #14840

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 19:03:03 +02:00
Josef Litoš
b1ffc52694
runtime(i3config/swayconfig): fix floating_modifier highlight (#14841)
Signed-off-by: JosefLitos <litosjos@fit.cvut.cz>
Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 17:31:36 +02:00
Amelia Clarke
35dfe58a54
patch 9.1.0442: hare runtime files outdated
Problem:  hare runtime files outdated
Solution: runtime(hare): update hare.vim to match upstream
          (Amelia Clarke)

closes: #14836

Signed-off-by: Amelia Clarke <selene@perilune.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0442
2024-05-24 08:05:00 +02:00
zeertzjq
2b09de9104
patch 9.1.0441: getregionpos() can't properly indicate positions beyond eol
Problem:  getregionpos() can't properly indicate positions beyond eol.
Solution: Add an "eol" flag that enables handling positions beyond end
          of line like getpos() does (zeertzjq).

Also fix the problem that a position still has the coladd beyond the end
of the line when its column has been clamped.  In the last test case
with TABs at the end of the line the old behavior is obviously wrong.

I decided to gate this behind a flag because returning positions that
don't correspond to actual characters in the line may lead to mistakes
for callers that want to calculate the length of the selected text, so
the behavior is only enabled if the caller wants it.

closes: #14838

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0441
2024-05-24 07:48:51 +02:00
Yegappan Lakshmanan
44cadaa18c
patch 9.1.0440: function get_lval() is too long
Problem:  function get_lval() is too long
Solution: factor out the get_lval_subscript() function
          (Yegappan Lakshmanan)

closes: #14839

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0440
2024-05-24 07:44:10 +02:00
Christian Brabandt
42a5b5a6d0
patch 9.1.0439: Cannot filter the history
Problem:  Cannot filter the history
Solution: Implement :filter :history

closes: #14835

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0439
2024-05-24 07:39:34 +02:00
zeertzjq
3074137542
patch 9.1.0438: Wrong Ex command executed when :g uses '?' as delimiter
Problem:  Wrong Ex command executed when :g uses '?' as delimiter and
          pattern contains escaped '?'.
Solution: Don't use "*newp" when it's not allocated (zeertzjq).

closes: #14837

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0438
2024-05-24 07:37:36 +02:00
James Eapen
22ac941208
runtime(i3config/swayconfig): support floating_modifier none; revert broken highlighting
- fix floating_modifier $mod normal|inverse was being hightlighted as error
  reverting the floating_modifier change from dd83b63
- will currently allow invalid syntax after floating_modifier

fixes: #14826
closes: #14827

Co-authored-by: JosefLitos <litosjos@fit.cvut.cz>
Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 20:48:54 +02:00
Drew Vogel
742062f31f
patch 9.1.0437: Motif requires non-const char pointer for XPM data
Problem:  Motif requires non-const char pointer for XPM data shared with
          GTK (Tony Mechelynck, after v9.1.0432)
Solution: Cast non-const to const char pointer for GTK (Drew Vogel).

closes: #14834

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0437
2024-05-23 17:49:39 +02:00
zeertzjq
789679cfc4
patch 9.1.0436: Crash when using '?' as separator for :s
Problem:  Crash when using '?' as separator for :s and pattern contains
          escaped '?'s (after 9.1.0409).
Solution: Always compute startplen. (zeertzjq).

related: neovim/neovim#28935
closes: 14832

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0436
2024-05-23 17:41:26 +02:00
K.Takata
cd79f8fbd3
patch 9.1.0435: filetype: cygport files are not recognized
Problem:  filetype: cygport files are not recognized
Solution: Recognize '*.cygport' files as sh filetype
          (Ken Takata)

https://cygwin.github.io/cygport/cygport_in.html

closes: #14833

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0435
2024-05-23 17:31:26 +02:00
Derek Schrock
3554d9bfcc
patch 9.1.0434: make errors trying to access autoload/zig
Problem:  make errors trying to access autoload/zig
Solution: Remove autoload/zig from Makefile, adjust Filelist
          (Derek Schrock)

Commit d1d9316c6 removed autoload/zig/ files and install/uninstall target
of the Makefile fail since the directory doesn't exist any longer.

closes: #14828

Signed-off-by: Derek Schrock <dereks@lifeofadishwasher.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0434
2024-05-23 17:27:05 +02:00
zeertzjq
701ad50a9e
patch 9.1.0433: Wrong yanking with exclusive selection and ve=all
Problem:  Wrong yanking with exclusive selection and virtualedit=all,
          and integer overflow when using getregion() on it.
Solution: Set coladd when decreasing column and 'virtualedit' is active.
          Add more tests for getregion() with 'virtualedit' (zeertzjq).

closes: #14830

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0433
2024-05-23 07:47:55 +02:00
Christian Brabandt
f2d74e3b63
runtime(comment): add missing help tags file
fixes: #14829

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 07:24:29 +02:00
Drew Vogel
5090f838bb
patch 9.1.0432: Ancient XPM preprocessor hack may cause build errors
Problem:  Ancient XPM preprocessor hack may cause build errors.
Solution: Simplify XPM includes and get rid of complicated #ifdef magic
          (Drew Vogel).

closes: #14816

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0432
2024-05-22 16:51:53 +02:00
Riley Bruins
802fc04a78
runtime(rescript): include basic rescript ftplugin file (#14822)
Reference: https://rescript-lang.org/docs/manual/latest/overview#comments

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-22 16:49:17 +02:00
Yegappan Lakshmanan
25536f415e
patch 9.1.0431: eval.c is too long
Problem:  eval.c is too long
Solution: Move garbage collection code to new gc.c file
          (Yegappan Lakshmanan)

closes: #14824

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0431
2024-05-22 16:45:04 +02:00
zeertzjq
52a6f34887
patch 9.1.0430: getregionpos() doesn't handle one char selection
Problem:  getregionpos() doesn't handle one char selection.
Solution: Handle startspaces differently when is_oneChar is set.
          Also add a test for an exclusive charwise selection with
          multibyte chars (zeertzjq)

closes: #14825

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0430
2024-05-22 16:42:44 +02:00
Christian Brabandt
95ff39f8e3
CI: disable -O2 for Coverity after v9.1.0429
gcc -O2 outputs this warning and turns it into an error when running
Coverity action:

```
eval.c: In function ‘echo_string_core’:
cc1: warning: function may return address of local variable [-Wreturn-local-addr]
eval.c:6495:12: note: declared here
 6495 |     char_u buf[MAX_FUNC_NAME_LEN];
      |            ^~~
```

This seems to be a false positive, so disable -O2 for Coverity
specifically.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-22 07:56:24 +02:00
Ubaldo Tiberi
62ccaa60d5
runtime(termdebug): check for gdb file/dir before using as buffer name
Add test so that this doesn't regress.

fixes: #12718
closes: #14792

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 23:33:03 +02:00
Tiseno
d1d9316c66
runtime(zig): refactor zig ftplugin, remove auto format
Refactored zig ftplugin, removed upstream comment, aucmd and
auto formatting support. Updated documentation for zig configuration
settings and added new maintainer.

closes: #13803

Signed-off-by: Tiseno <mathias.lindgren@stabelo.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 23:27:03 +02:00
Christian Brabandt
b335a9312c
patch 9.1.0429: Coverity complains about eval.c refactor
Problem:  Coverity complains about eval.c refactor
          (after v9.1.0422)
Solution: Check that buf is not used un-initialized,
          add explicit conditions for save and restore
          of copyID

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0429
2024-05-21 18:39:10 +02:00