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

19166 Commits

Author SHA1 Message Date
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>
2024-05-29 07:51:50 +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>
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>
2024-05-26 18:42:18 +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>
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>
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>
2024-05-24 19:07:12 +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>
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>
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>
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>
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>
2024-05-24 07:37:36 +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>
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>
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>
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>
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>
2024-05-23 07:47:55 +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>
2024-05-22 16:51:53 +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>
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>
2024-05-22 16:42:44 +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
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>
2024-05-21 18:39:10 +02:00
zeertzjq
42cd192daa
patch 9.1.0428: Tag guessing leaves wrong search history with very short names
Problem:  Tag guessing leaves wrong search history with very short names
          (after 9.1.0426).
Solution: Use the correct variable for pattern length (zeertzjq).

closes: #14817

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 17:19:58 +02:00
Ken Takata
ffed1540f3
patch 9.1.0427: tests: some issues with termdebug mapping test
Problem:  tests: some issues with termdebug mapping test
Solution: Use assert_{true,false} if suitable, change
          order of expected and actual arguments in assert() calls.
          (Ken Takata)

closes: #14818
related: 7fbbd7f

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 17:14:56 +02:00
John Marriott
8c85a2a49a
patch 9.1.0426: too many strlen() calls in search.c
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: #14796

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 19:18:26 +02:00
Riley Bruins
155583a5c3
patch 9.1.0425: filetype: purescript files are not recognized
Problem:  filetype: purescript files are not recognized
Solution: recognize '*.purs' files as purescript filetype,
          include basic purescript filetype plugin
          (Riley Bruins)

Reference: https://github.com/purescript/documentation/blob/master/language/Syntax.md#comments

closes: #14813

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:21:53 +02:00
Riley Bruins
aa3104b07a
patch 9.1.0424: filetype: slint files are not recognized
Problem:  filetype: slint files are not recognized
Solution: Detect '*.slint' files as slint filetype,
          include basic sling filetype plugin
          (Riley Bruins)

closes: #14808

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:20:09 +02:00
zeertzjq
c95e64f41f
patch 9.1.0423: getregionpos() wrong with blockwise mode and multibyte
Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly (zeertzjq).

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

closes: #14805

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:00:31 +02:00
Yegappan Lakshmanan
22029edb6c
patch 9.1.0422: function echo_string_core() is too long
Problem:  function echo_string_core() is too long
Solution: Refactor into several smaller functions
          (Yegappan Lakshmanan)

closes: #14804

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 13:57:11 +02:00
Riley Bruins
5f1b115afd
patch 9.1.0421: filetype: hyprlang files are not recognized
Problem:  filetype: hyprlang files are not recognized
Solution: recognize 'hypr{land,paper,idle,lock}.conf' files
          as 'hyprlang' filetype, add hyprlang ftplugin
          (Riley Bruins)

closes: #14803

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 11:26:44 +02:00
Christian Brabandt
0b0f7d6be0
patch 9.1.0420: :browse oldfiles prompts even with single entry
Problem:  :browse oldfiles prompts even with single entry
Solution: Do not prompt, but edit the file directly,
          also when using :filter /pat/ browse oldfiles

closes: #14794

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:11:09 +02:00
Yegappan Lakshmanan
4776e64e72
patch 9.1.0419: eval.c not sufficiently tested
Problem:  eval.c not sufficiently tested
Solution: Add a few more additional tests for eval.c,
          (Yegappan Lakshmanan)

closes: #14799

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:06:50 +02:00
Christ van Willegen - van Noort
8e4c4c7d87
patch 9.1.0418: Cannot move to previous/next rare word
Problem:  Cannot move to previous/next rare word
          (Colin Kennedy)
Solution: Add the ]r and [r motions (Christ van Willegen)

fixes: #14773
closes: #14780

Signed-off-by: Christ van Willegen - van Noort <github.com@vanwillegen-vannoort.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:52:45 +02:00
Christian Brabandt
f0905a8613
patch 9.1.0417: if_py: find_module has been removed in Python 3.12.0a7
Problem:  if_py: find_module has been removed in Python 3.12.0a7
          (@Ghost-LZW)
Solution: Do not include find_module for Python >= 3.12.0a7

fixes: #14776
closes: #14781

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:30:26 +02:00
Luuk van Baal
2e642734f4
patch 9.1.0416: some screen dump tests can be improved
Problem:  some screen dump tests can be improved (after 9.1.0414)
Solution: Make sure screen state changes properly and is captured in the
          screen dumps (Luuk van Baal)

closes: #14788

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:28:02 +02:00
Yegappan Lakshmanan
fe424d13ef
patch 9.1.0415: Some functions are not tested
Problem:  Some functions are not tested
Solution: Add a few more tests, fix a few minor problems
          (Yegappan Lakshmanan)

closes: #14789

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:20:43 +02:00
Luuk van Baal
b32055e504
patch 9.1.0414: Unable to leave long line with 'smoothscroll' and 'scrolloff'
Problem:  Unable to leave long line with 'smoothscroll' and 'scrolloff'.
          Corrupted screen near the end of a long line with 'scrolloff'.
          (Ernie Rael, after 9.1.0280)
Solution: Only correct cursor in case scroll_cursor_bot() was not itself
          called to make the cursor visible. Avoid adjusting for
          'scrolloff' beyond the text line height (Luuk van Baal)

fixes: #14726
closes: #14783

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-16 20:44:09 +02:00
Christian Brabandt
eff20eb35d
patch 9.1.0413: smoothscroll may cause infinite loop
Problem:  smoothscroll may cause infinite loop, with
          very narrow windows
          (Jaehwang Jung, after v9.1.0280)
Solution: Check for width1 being negative, verify
          that win_linetabsize does not overflow

fixes: #14750
closes: #14772

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-15 21:35:36 +02:00
Christian Brabandt
6043024cd4
patch 9.1.0412: typo in regexp_bt.c in DEBUG code
Problem:  typo in regexp_bt.c in DEBUG code, causing
          compile error (@kfleong7, after v9.1.0409)
Solution: Replace bulen by buflen

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-14 11:19:47 +02:00
Yegappan Lakshmanan
4ceb4dc825
patch 9.1.0411: too long functions in eval.c
Problem:  too long functions in eval.c
Solution: refactor functions (Yegappan Lakshmanan)

closes: #14755

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-12 09:24:35 +02:00
John Marriott
d01e699348
patch 9.1.0410: warning about uninitialized variable
Problem:  warning about uninitialized variable
          (Tony Mechelynck, after 9.1.0409)
Solution: initialize variable (John Marriott)

closes: #14754

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-12 09:01:38 +02:00
John Marriott
82792db631
patch 9.1.0409: too many strlen() calls in the regexp engine
Problem:  too many strlen() calls in the regexp engine
Solution: refactor code to retrieve strlen differently, make use
          of bsearch() for getting the character class
          (John Marriott)

closes: #14648

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-12 00:07:17 +02:00
Christian Brabandt
9c0ff47098
patch 9.1.0408: configure fails on Fedora when including perl
Problem:  configure fails on Fedora when including perl
          (chesheer-smile)
Solution: Filter out -spec=<path> from $LIBS and $LDFLAGS to avoid
          linking relocation errors for unrelated autoconf tests.

closes: #14526

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-11 20:22:32 +02:00
Luuk van Baal
58448e09be
patch 9.1.0407: Stuck with long line and half-page scrolling
Problem:  No scrolling happens with half-page scrolling with line
          filling entire window when 'smoothscroll' is disabled.
          (Mathias Rav, after v9.1.0285)
Solution: Adjust amount to move cursor by so that it is moved the same
          number of lines as was scrolled, even when scrolling different
          number of lines than requested with 'nosmoothscroll'.

fixes: #14743
closes: #14746

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-11 11:27:52 +02:00
zeertzjq
031a745608
patch 9.1.0406: Divide by zero with getmousepos() and 'smoothscroll'
Problem:  Divide by zero with getmousepos() and 'smoothscroll'.
Solution: Don't compute skip_lines when width1 is zero.
          (zeertzjq)

closes: #14747

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-11 11:23:37 +02:00
Christian Brabandt
b7deb1b69e
patch 9.1.0405: tests: xxd buffer overflow fails on 32-bit
Problem:  tests: xxd buffer overflow fails on 32-bit
Solution: Skip test on 32-bit architecture

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 20:03:21 +02:00
Lennard Hofmann
67797191e0
patch 9.1.0404: [security] xxd: buffer-overflow with specific flags
Problem:  [security] xxd: buffer-overflow with specific flags
Solution: Correctly calculate the required buffer space
          (Lennard Hofmann)

xxd writes each output line into a global buffer before printing.
The maximum size of that buffer was not calculated correctly.

This command was crashing in AddressSanitizer:
$ xxd -Ralways -g1 -c256 -d -o 9223372036854775808 /etc/passwd

This prints a line of 6680 bytes but the buffer only had room for 6549 bytes.
If the output from "-b" was colored, the line could be even longer.

closes: #14738

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Lennard Hofmann <lennard.hofmann@web.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 14:41:18 +02:00
Yegappan Lakshmanan
8c35c26c1f
patch 9.1.0403: Vim9: not able to import file from start dir
Problem:  Vim9: not able to import file from start dir
          (Danielle McLean)
Solution: Allow to import from start directory
          (Yegappan Lakshmanan)

fixes: #13313
closes: #14740

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 13:10:54 +02:00
Wu, Zhenyu
63f2a5b8ad
patch 9.1.0402: filetype: mdd files detected as zsh filetype
Problem:  filetype: mdd files detected as zsh filetype
Solution: detect '*.mdd' files as sh filetype, add links
          to reference documentation (Wu, Zhenyu)

closes: #14741

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 13:01:54 +02:00
Wu, Zhenyu
887a38cee7
patch 9.1.0401: filetype: zsh module files are not recognized
Problem:  filetype: zsh module files are not recognized
Solution: Detect '*.mdh' and '*.epro' as C filetype, '*.mdd' as zsh
          filetype, determine zsh-modules '*.pro' from from it's content
          (Wu, Zhenyu)

closes: #14737

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-09 20:35:13 +02:00
Yegappan Lakshmanan
1b53172901
patch 9.1.0400: Vim9: confusing error message for unknown type
Problem:  Vim9: confusing error message for unknown type
          (Doug Kearns)
Solution: For an unknown type, display only the type name in the error
          message (Yegappan Lakshmanan)

fixes: #13153
closes: #14736

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-09 09:15:02 +02:00