0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

16022 Commits

Author SHA1 Message Date
Yegappan Lakshmanan
b102728c20
patch 9.0.1737: Calling a base class method through an extended class fails
Problem: Calling a base class method through an extended class fails
Solution: Create lookup table for member index in the interface to
          to the member class implementing the interface

Create additional tests for Vim9 classes.  Fix unconvered memory leaks
and crashes found by the new tests.

closes: #12848
closes: #12089

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>author
2023-08-19 11:26:42 +02:00
Christian Brabandt
07a2b61d4c
patch 9.0.1736: Github Actions times out after 20 minutes
Problem: Github Actions times out after 20 minutes
Solution: Increase the timeout to 25 minutes

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-18 01:20:42 +02:00
zeertzjq
e9ef347c13
patch 9.0.1735: Rename completion specific findex var
Problem: Rename completion specific findex var
Solution: Move "findex" static variable to xp_selected in expand_T

closes: #12548

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:57:05 +02:00
zeertzjq
be5cdd1d63
patch 9.0.1734: :runtime completion fails for multiple args
Problem: :runtime completion fails for multiple args
Solution: Make it work

closes: #12616

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:48:58 +02:00
Philip H
d2af6c66fe
patch 9.0.1733: CI: cannot cache linux-modules-extra
Problem: CI: cannot cache linux-modules-extra
Solution: Enable caching and reduce failed downloads

closes: #12779

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-17 23:45:08 +02:00
Christian Brabandt
d5475e8d8d
patch 9.0.1732: vimexpr: shadowing variable
Problem: vimexpr: shadowing variable
Solution: Rename local variable

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-17 23:41:33 +02:00
zeertzjq
6e940d9a1d
patch 9.0.1731: blockwise Visual highlight not working with virtual text
Problem: blockwise Visual highlight not working with virtual text
Solution: Reset the correct variable at the end of virtual selection and
          Check for double-width char inside virtual text.

closes: #12606

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:21:40 +02:00
zeertzjq
008c91537b
patch 9.0.1730: passing multiple patterns to runtime not working
Problem: passing multiple patterns to runtime not working
Solution: prepend prefix to each argument separately

closes: #12617

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:08:53 +02:00
zeertzjq
bfe377b8f2
patch 9.0.1729: screenpos() wrong when w_skipcol and cpoptions+=n
Problem:    screenpos() wrong result with w_skipcol and cpoptions+=n
Solution:   Use adjust_plines_for_skipcol() instead of subtracting
            w_skipcol.

closes: #12625

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:58:53 +02:00
zeertzjq
825cf813fa
patch 9.0.1728: missing winid argument for virtcol()
Problem: missing winid argument for virtcol()
Solution: Add a {winid} argument to virtcol()

Other functions col(), charcol() and virtcol2col() support a {winid}
argument, so it makes sense for virtcol() to also support than.

Also add test for virtcol2col() with 'showbreak' and {winid}.

closes: #12633

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:55:25 +02:00
Sean Dewar
b0efa49ed1
patch 9.0.1727: minor problems with the teapot
Problem: minor problems with the teapot()
Solution: remove the null check, update documentation

Update the builtin-function-list entry. (It implicitly returns 0, but such
functions usually use "none")

Also, tv_get_string_strict() can not return NULL, so remove that check

closes: #12647

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-08-17 22:48:43 +02:00
Sean Dewar
876f5fb570
patch 9.0.1726: incorrect heights in win_size_restore()
Problem: incorrect heights in win_size_restore()
Solution: avoid restoring incorrect heights in win_size_restore()

Changing 'showtabline' or 'cmdheight' in the cmdwin restores incorrect
window heights after closing the cmdwin.

This may produce a gap between the cmdline and the window above.

Solution: restore window sizes only if the number of lines available for windows
changed; subtract the rows of the tabline, cmdline and last window's statusline
from 'lines' (other statuslines don't matter).

closes: #12704

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-08-17 22:40:05 +02:00
zeertzjq
e500ae8e29
patch 9.0.1725: cursor pos wrong after concealed text with 'virtualedit'
Problem:    Wrong cursor position when clicking after concealed text
            with 'virtualedit'.
Solution:   Store virtual columns in ScreenCols[] instead of text
            columns, and always use coladvance() when clicking.

This also fixes incorrect curswant when clicking on a TAB, so now
Test_normal_click_on_ctrl_char() asserts the same results as the ones
before patch 9.0.0048.

closes: #12808

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:35:26 +02:00
h-east
2261c89a49
patch 9.0.1724: vim9class constructor argument type checking bug
Problem: vim9class constructor argument type checking bug
Solution: fix it

closes: #12816

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
2023-08-17 22:31:10 +02:00
zeertzjq
ad0c442f1f
patch 9.0.1723: Fix regression in {func} argument of reduce()
Problem: Fix regression in {func} argument of reduce()
Solution: pass function name as string again

Before patch 9.0.0548, passing a string as {func} argument of reduce()
is treated as a function name, but after patch 9.0.0548 it is treated as
an expression instead, which is useless as reduce() doesn't set any v:
variables. This PR restores the behavior of {func} before that patch.

Also correct an emsg() call, as e_string_list_or_blob_required doesn't
contain format specifiers.

closes: #12824

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:15:47 +02:00
zeertzjq
4f389e7c0f
patch 9.0.1722: wrong error messages when passing wrong types to count()
Problem: wrong error messages when passing wrong types to count()
Solution: fix it

This fixes two problems:
1. When passing wrong type to {ic} argument of count(), two error
   messages are given, the second of which is misleading.
2. When passing wrong type to {comp} argument of count(), the error
   message doesn't mention that {comp} may be a String.

closes: #12825

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:11:16 +02:00
zeertzjq
4112acae08
patch 9.0.1721: Build failure on Windows with dynamic lua
Problem: Build failure on Windows with dynamic lua (after 9.0.1719)
Solution: move definition further down in if_lua

closes: #12811
closes: #12814
closes: #12818

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-16 20:25:10 +02:00
Yegappan Lakshmanan
a456b12011
patch 9.0.1720: Vim9 class using wrong index for overridden method
Problem: Vim9 class using wrong index for overridden method
Solution: Use correct index for overridden method

closes: #12524
closes: #12813

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-16 20:14:37 +02:00
Jesse Pavel
8a35033782
patch 9.0.1719: if_lua: crash for for Lua functions invoked via Vim callbacks
Problem: if_lua: crash for Lua functions invoked via Vim callbacks
Solution: Use Lua registry rather than upvalues for udata cache

closes: #12785

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Jesse Pavel <jpavel@alum.mit.edu>
2023-08-15 23:21:05 +02:00
LemonBoy
e98fb643ec
patch 9.0.1718: dict-completion does not respect region
Problem: dict-completion does not respect region
Solution: respect selected region in dict completion

Set do_region to zero as we don't want a complete dump of the matching
words, we want the code to filter them according to the user's selected
region.

closes: #12792
closes: #7025

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-15 23:14:30 +02:00
Yegappan Lakshmanan
b209b86e66
patch 9.0.1717: virtcol2col returns last byte of a multi-byte char
Problem: virtcol2col returns last byte of a multi-byte char
Solution: Make it return the first byte for a multi-byte char

closes: #12786
closes: #12799

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-15 23:01:44 +02:00
Zdenek Dohnal
15a0a0281a
patch 9.0.1716: Windows build with python 3.12 and clang fails
Problem: Windows build with python 3.12 and clang fails
Solution: Remove the PyBool_Type function pointer for python 3.12

Clang on Win doesn't like non-static functions in static struct with
Python 3.12 - removing the new obfuscated function and protecting the
old PyBool function for older Pythons fixes the issue.

closes: #12800

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-15 22:52:01 +02:00
zeertzjq
7772c93a3e
patch 9.0.1715: duplicate test in message_test.c
Problem: duplicate test in message_test.c
Solution: Remove duplicate test and make functions static

closes: #12803

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-15 22:48:40 +02:00
zeertzjq
e4c79d3615
patch 9.0.1714: getcompletion() "cmdline" fails after :autocmd
Problem:  getcompletion() "cmdline" fails after :autocmd
Solution: Use set_cmd_context() instead of set_one_cmd_context().

closes: #12804

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-15 22:41:53 +02:00
Zdenek Dohnal
ba913b14dd
patch 9.0.1713: Github CI fails to load snd-dummy kernel module
Problem: Github CI fails to load snd-dummy kernel module
Solution: Make installation of linux-modules-extra optional

linux-modules-extra package are not available on Ubuntu 22 at the
moment, which breaks CI runs. The change make its installation
conditional as the original `if-else` structure tried to do.

closes: #12801

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-15 22:34:45 +02:00
Jia-Ju Bai
5b0889b8bf
patch 9.0.1712: missing null check in object_clear()
Problem: missing null check in object_clear()
Solution: Add null check of cl

closes: #12627

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Jia-Ju Bai <baijiaju@buaa.edu.cn>
2023-08-13 20:05:18 +02:00
zeertzjq
d3515a1e88
patch 9.0.1711: dead code in charset.c
Problem: dead code in charset.c
Solution: remove it

linetabsize_col() calls init_chartabsize_arg() with 0 as "lnum", so
cts.cts_has_prop_with_text is always FALSE.

closes: #PR

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-13 20:00:14 +02:00
Christian Brabandt
4a8eb6e7a9
patch 9.0.1710: scrolloff options work slightly different
Problem: sidescrolloff and scrolloff options work slightly
         different than other global-local options
Solution: Make it behave consistent for all global-local options

It was noticed, that sidescrolloff and scrolloff options behave
differently in comparison to other global-local window options like
'listchars'

So make those two behave like other global-local options. Also add some
extra documentation for a few special local-window options.

Add a few tests to make sure all global-local window options behave
similar

closes: #12956
closes: #12643

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-13 19:43:42 +02:00
Zdenek Dohnal
e5e4709a6a
patch 9.0.1709: dynamic build with python 3.12 breaks
Problem: dynamic build with python 3.12 breaks
Solution: if_python3.c: Fix building dynamic Python3 interpreter

There are new extern global variables defined in python3 development
files, which types are within python3 library, so they break dynamic
python3 interpret Vim plugin.

Since the variables are used in macro `Py_SIZE` which is used in other
python3 headers, the dummy variables have to defined before including
Python.h.

closes: #12660

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-13 19:39:27 +02:00
Christian Brabandt
8ef1fbc0c3
patch 9.0.1708: getcompletion() failes for user-defined commands
Problem: getcompletion() failes for user-defined commands
Solution: set context for completion function

closes: #12681
closes: #12680

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-13 19:32:37 +02:00
Christian Brabandt
badeedd913
patch 9.0.1707: Cannot wrap around in popup_filter_menu()
Problem: Cannot wrap around in popup_filter_menu()
Solution: Allow to wrap around by default

Currently, it is not possible, to wrap around at the end of the list
using e.g. down (and go back to the top) or up at the beginning of the
list and go directly to the last item. This is not consistent behaviour
with e.g. how the pum-menu currently works, so let's just allow this.

Also adjust tests about it.

closes: #12689
closes: #12693

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-13 19:27:46 +02:00
Matthias Braun
02551c9de0
patch 9.0.1706: typos in the xxd manpage
Problem: typos in the xxd manpage
Solution: Fix typos and formatting

closes: #12645

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Matthias Braun <mb720@users.noreply.github.com>
2023-08-13 19:21:38 +02:00
zeertzjq
b25dbb3f9b
patch 9.0.1705: cursor position wrong when clicking on an unprintable char
Problem:  cursor position wrong when clicking on an unprintable char
Solution: Don't update prev_ptr when wlv.n_extra is not zero.

closes: #12664

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-13 18:11:05 +02:00
Christ van Willegen
0c6181fec4
patch 9.0.1704: Cannot use positional arguments for printf()
Problem: Cannot use positional arguments for printf()
Solution: Support positional arguments in string formatting

closes: #12140

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-08-13 18:06:00 +02:00
Yegappan Lakshmanan
74cc13cc40
patch 9.0.1703: Vim9 Calling a method in an extended class fails
Problem: Vim9 Calling a method in an extended class fails
Solution: use method index directly

closes: #12778

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-13 17:41:26 +02:00
zeertzjq
9c30f43899
patch 9.0.1702: Undo test is flaky
Problem:  Undo test is flaky.
Solution: Apply filter and change time to "1 second ago" in both dumps.

closes: #12771

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-13 10:31:27 +02:00
Yegappan Lakshmanan
57a02ccf4c
patch 9.0.1701: vim9 crash when class member overridden
Problem: vim9 crash when class member overridden
Solution: Use method_count field instead

closes: #12676
closes: #12677

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-13 10:19:38 +02:00
K.Takata
32f586eec1
patch 9.0.1700: Cannot compile with dynamic perl < 5.38
Problem: Cannot compile with dynamic perl < 5.38 (after 9.0.1681)
Solution: Fix if_perl/dyn from perl 5.32 to 5.38

closes: #12755

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: K.Takata <kentkt@csc.jp>
2023-08-13 10:15:05 +02:00
Mike Williams
6c313bbb04
patch 9.0.1699: compile warning for xdiff/xutils on MS-Windows
Problem: compile warning for xdiff/xutils on MS-Windows
Solution: add explicit type cast from size_t to long

closes: #12531

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Mike Williams <mikew@globalgraphics.com>
2023-08-12 20:50:55 +02:00
zeertzjq
7fe1089904
patch 9.0.1698: Test_map_restore_sid fails in GUI
Problem: Test_map_restore_sid fails in GUI
Solution: Feed an unsimplified Ctrl-B

closes: #12770

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-12 20:44:21 +02:00
Christ van Willegen
73b8209266
patch 9.0.1697: incsearch test not sufficient
Problem: incsearch test not sufficient (after 9.0.1691)
Solution: add an additional test

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-08-12 20:17:26 +02:00
Christian Brabandt
8878653a44
patch 9.0.1696: sodium_mlock may still fail in CI
Problem: sodium_mlock may still fail in CI
Solution: Catch E1230 in testscript and skip test

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-12 09:41:23 +02:00
Christian Brabandt
f1cc4d55b9
patch 9.0.1695: Crash with overlong textprop above
Problem: Crash with overlong textprop above
Solution: Consider only positive padding

closes: #12665
closes: #12661

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-12 00:14:14 +02:00
zeertzjq
bacc83009b
patch 9.0.1694: wrong mapping applied when replaying a char search
Problem: wrong mapping applied when replaying a char search
Solution: Store a NOP after the ESC

closes: #12708
closes: #6350

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-12 00:09:31 +02:00
Christian Brabandt
2d63e4b3cc
patch 9.0.1693: Ctrl-Q not handled like Ctrl-V in replace mode
Problem: Ctrl-Q not handled like Ctrl-V in replace mode
Solution: Handle Ctrl-Q like Ctrl-V

closes: #12686
closes: #12684

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-12 00:03:57 +02:00
cions
db4fd29063
patch 9.0.1692: Android not handling AI_V4MAPPED ai_flag
Problem: Android not handling AI_V4MAPPED ai_flag
Solution: don't set AI_V4MAPPED flag when on Android, since
          Android's getaddrinfo returns EAI_BADFLAGS if ai_flags
          contains it

closes: #12613

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: cions <gh.cions@gmail.com>
2023-08-11 23:53:13 +02:00
zeertzjq
7b7b4cb6f2
patch 9.0.1691: wrong viewport restored for incsearch and smoothscroll
Problem: wrong viewport restored for incsearch and smoothscroll
Solution: Save and restore skipcol as well

closes: #12713

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-11 23:48:27 +02:00
Christian Brabandt
f6cdab3704
patch 9.0.1690: popup_create() not aborting on errors
Problem: popup_create() not aborting on errors
Solution: check for errors in arguments given and abort if an error
          occurred

closes: #12711

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-11 23:42:02 +02:00
Zdenek Dohnal
288bf26c53
patch 9.0.1689: python 3.12 produces warnings and fails test
Problem: python 3.12 produces warnings and fails test
Solution: Make use of raw strings in python3 tests

closes: #12765

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-11 23:32:23 +02:00
Tom Praschan
ca6ac99077
patch 9.0.1688: cannot store custom data in quickfix list
Problem: cannot store custom data in quickfix list
Solution: add `user_data` field for the quickfix list

closes: #11818

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tom Praschan <13141438+tom-anders@users.noreply.github.com>
2023-08-11 23:26:12 +02:00