zeertzjq [Sun, 26 May 2024 16:42:18 +0000 (18:42 +0200)]
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>
* 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>
zeertzjq [Fri, 24 May 2024 17:07:12 +0000 (19:07 +0200)]
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>
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>
zeertzjq [Fri, 24 May 2024 05:37:36 +0000 (07:37 +0200)]
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>
James Eapen [Thu, 23 May 2024 18:47:49 +0000 (20:47 +0200)]
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>
Drew Vogel [Thu, 23 May 2024 15:49:39 +0000 (17:49 +0200)]
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>
zeertzjq [Thu, 23 May 2024 05:47:55 +0000 (07:47 +0200)]
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>
zeertzjq [Wed, 22 May 2024 14:42:44 +0000 (16:42 +0200)]
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>
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.
Tiseno [Tue, 21 May 2024 21:27:03 +0000 (23:27 +0200)]
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>
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
zeertzjq [Tue, 21 May 2024 15:19:58 +0000 (17:19 +0200)]
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>
Ken Takata [Tue, 21 May 2024 15:14:56 +0000 (17:14 +0200)]
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)
John Marriott [Mon, 20 May 2024 17:18:26 +0000 (19:18 +0200)]
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>
zeertzjq [Mon, 20 May 2024 12:00:31 +0000 (14:00 +0200)]
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>
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
Luuk van Baal [Fri, 17 May 2024 16:25:13 +0000 (18:25 +0200)]
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>
Luuk van Baal [Thu, 16 May 2024 18:44:09 +0000 (20:44 +0200)]
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>
jbm950 [Thu, 16 May 2024 17:53:39 +0000 (13:53 -0400)]
runtime(doc): fix typo in vim9script help file (#14782)
This commit fixes a typo in the first example of the vim9script help
file. Trying to execute the given example before resulted in a "trailing
characters" error.
Signed-off-by: jbm950 <jmilam343@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
CI: Upload failed screendump tests when run in github actions
It's a bit of a pain to debug failing screendump tests without knowing
exactly what went wrong. Therefore include actions/upload-artifact for
the Github CI runners and have them uploaded those failing screen dump
tests automatically.
Let's add this step to each of the Linux/MacOS/Windows workflows but do
not duplicate the code, factor it out to a single file
.github/actions/screendump/action.yml and reference this one from the
main ci.yml file
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>
Cthulhux [Wed, 15 May 2024 18:53:52 +0000 (20:53 +0200)]
runtime(doc): update vi_diff.txt: add default value for 'flash'
The "flash" option was added relatively late and seems to be exclusive
to System V. (It's not in 4.4BSD and it's not in V8 UNIX, checked [on
TUHS](https://www.tuhs.org/cgi-bin/utree.pl).) The oldest occurrence of
`flash` in "a vi" I could find is in SysV R2 for the VAX, where it
[defaults to
1](https://github.com/ryanwoodsmall/oldsysv/blob/master/sysvr2-vax/src/cmd/vi/vax/ex_data.c)
= on.
closes: #14778
Signed-off-by: Cthulhux <github@tuxproject.de> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aliaksei Budavei [Mon, 13 May 2024 19:06:05 +0000 (22:06 +0300)]
runtime(syntax-tests): Filter out non-Latin-1 characters for syntax tests (#14767)
Syntax tests are run with the LC_ALL=C environment variable
passed to "make". Occasionally, there are CI failures for
such test files containing non-Latin-1 characters with error
messages pointing to multi-byte characters:
these failures are unrelated to the nature of syntax tests
and should be considered false positives.
As a temporary workaround, all bytes of known non-Latin-1
characters can be replaced in memory with an arbitrary ASCII
byte (?) by applying a filter
> " To ignore part of the dump, provide a "dumps/{filename}.vim" file with
> " Vim commands to be applied to both the reference and the current dump, so
> " that parts that are irrelevant are not used for the comparison. The result
> " is NOT written, thus "term_dumpdiff()" shows the difference anyway.
before lines are compared between files.
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
The current logic is a bit funny, in that it checks for an executable of
scp, then pscp and if neither exists, it uses: scp :/
Anyway, let's fall back to the logic used before the above commit.
John Marriott [Sat, 11 May 2024 22:07:17 +0000 (00:07 +0200)]
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>
Tom Picton [Sat, 11 May 2024 18:26:06 +0000 (14:26 -0400)]
ftplugin(python): E16 fix, async keyword support for define (#14751)
This change includes the following changes:
- Fix "E16: Invalid range" when using a count with jump to start/end of class/method
- Update define with optional async keyword
- Update maintainer email
Signed-off-by: Tom Picton <tom@tompicton.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
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.
Luuk van Baal [Sat, 11 May 2024 09:27:52 +0000 (11:27 +0200)]
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>
Aliaksei Budavei [Fri, 10 May 2024 12:49:06 +0000 (15:49 +0300)]
runtime(java): Stop handpicking syntax groups for @javaTop (#14727)
* runtime(java): Stop handpicking syntax groups for @javaTop
Also:
- Remove the obsolete comment for g:java_allow_cpp_keywords.
- Remove the commented out groups java\%[Debug\]StringError.
- Infer and set the preferred formatting Vim options from
the modeline.
Since vim-6-0u, non-contained syntax groups can be referred
to by using the "contains=TOP..." argument.
* Set &encoding and &termencoding to "utf-8" for test files
* Limit non-ASCII charset to [§ƒɐɘʬʭΑ-Τα-μ] for test files
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Wu, Zhenyu [Thu, 9 May 2024 18:35:13 +0000 (20:35 +0200)]
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>
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>
patch 9.1.0399: block_editing errors out when using del
Problem: block_editing errors out when using del
(@Jamarley)
Solution: Change ins_len from size_t to int and
properly check that it doesn't become negative
There is a check in os.c that verifies that `ins_len` does not become
negative:
```
if (pre_textlen >= 0 && (ins_len = len - pre_textlen - offset) > 0)
```
However this only works, if ins_len can actually become negative and
unfortunately, ins_len has been declared as `size_t` so instead of
becoming negative it will wrap around and be very large.
So let's define it as integer, after which the condition above
properly catches this condition.