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

16194 Commits

Author SHA1 Message Date
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
zeertzjq
7e0bae024d
patch 9.0.1687: mapset() not properly handling script ID
Problem: mapset() not properly handling script ID
Solution: replace_termcodes() may accept a script ID

closes: #12699
closes: #12697

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-11 23:16:10 +02:00
Devin J. Pohly
5fee111149
patch 9.0.1686: undotree() only works for the current buffer
Problem:    undotree() only works for the current buffer
Solution:   Add an optional "buffer number" parameter to undotree().  If
            omitted, use the current buffer for backwards compatibility.

closes: #4001
closes: #12292

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
2023-08-11 22:53:39 +02:00
Philip H
422b9dcbfa
patch 9.0.1685: silence Python 3.11 depreciations for gcc
Problem: Python 3.11 interface throws deprecation warnings
Solution: ignore those warnings for gcc and clang

Python 3.11 deprecation warnings are already silenced for clang using
the pragma
```
 # pragma clang diagnostic ignored "-Wdeprecated-declarations"
```

However those warnings are also emitted when using gcc. To avoid them
for both compilers, change use the __GNUC__ ifdef, which is defined for
gcc as well as clang.

Additionally, instead of using the "clang diagnostic ignored" pragma,
let's make use of 'GCC diagnostic ignored' which is again supported by
clang and GCC

closes: #12610

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-11 22:38:48 +02:00
zeertzjq
b00df7aa38
patch 9.0.1684: Update libvterm to rev 839
Problem: libvterm slightly outdated
Solution: Update libvterm from rev 818 to rev 839

Notable fix: libvterm now handles DECSM/DECRM with multiple arguents,
so several ncurses programs (e.g. nnn) can enable mouse properly when
run in Vim's terminal in XTerm.

closes: #12746

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-11 21:15:08 +02:00
Christian Brabandt
6efb198033
Updated runtime files
This is a collection of various PRs from github that all require a minor
patch number:

1) https://github.com/vim/vim/pull/12612

    Do not conflate dictionary key with end of block

2) https://github.com/vim/vim/pull/12729:

    When saving and restoring 'undolevels', the constructs `&undolevels` and
    `:set undolevels` are problematic.

    The construct `&undolevels` reads an unpredictable value; it will be the
    local option value (if one has been set), or the global option value
    (otherwise), making it unsuitable for saving a value for later
    restoration.

    Similarly, if a local option value has been set for 'undolevels',
    temporarily modifying the option via `:set undolevels` changes the local
    value as well as the global value, requiring extra work to restore both
    values.

    Saving and restoring the option value in one step via the construct
    `:let &undolevels = &undolevels` appears to make no changes to the
    'undolevels' option, but if a local option has been set to a different
    value than the global option, it has the unintended effect of changing
    the global 'undolevels' value to the local value.

    Update the documentation to explain these issues and recommend explicit
    use of global and local option values when saving and restoring.  Update
    some unit tests to use `g:undolevels`.

3) https://github.com/vim/vim/pull/12702:

    Problem:    Pip requirements files are not recognized.
    Solution:   Add a pattern to match pip requirements files.

4) https://github.com/vim/vim/pull/12688:

    Add indent file and tests for ABB Rapid

5) https://github.com/vim/vim/pull/12668:

    Use Lua 5.1 numeric escapes in tests and add to CI

    Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings.  Lua
    5.1 only supports decimal escapes:

    > A character in a string can also be specified by its numerical value
    > using the escape sequence \ddd, where ddd is a sequence of up to three
    > decimal digits. (Note that if a numerical escape is to be followed by a
    > digit, it must be expressed using exactly three digits.) Strings in Lua
    > can contain any 8-bit value, including embedded zeros, which can be
    > specified as '\0'.

    To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to
    run with Lua 5.1 as well as Lua 5.4

6) https://github.com/vim/vim/pull/12631:

    Add hurl filetype detection

7) https://github.com/vim/vim/pull/12573:

    Problem:   Files for haskell persistent library are not recognized
    Solution:  Add pattern persistentmodels for haskell persistent library

closes: #12612
closes: #12729
closes: #12702
closes: #12688
closes: #12668
closes: #12631
closes: #12573

Co-authored-by: lacygoill <lacygoill@lacygoill.me>
Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev>
Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2023-08-10 06:19:18 +02:00
Christian Brabandt
6019fed0c5
patch 9.0.1682: sodium encryption is not portable
Problem: crypt: sodium encryption is not portable
Solution: use little-endian byte order for sodium encrypted files

As mentioned in #12586, sodium encryption only works on little ending
architectures, because reading and writing the sodium encryption
parameters are stored in the encrypted files in an arch-dependent way.

This of course fails for big-endian architectures like s390.

So make sure to use little-endian byte order when reading and writing
sodium encrypted files.

fixes: #12586
closes: 12655
2023-08-09 21:35:38 +02:00
Philip H
1d7caa58e3
patch 9.0.1681: Build Failure with Perl 5.38
Problem: Build Failure with Perl 5.38
Solution: Fix Build Failure

closes: #12543, closes: #12575
2023-08-09 19:58:58 +02:00
Christian Brabandt
335c584940
patch 9.0.1680: sodium test fails in Github CI
Problem:    sodium test fails in Github CI
Solution:   Catch sodium_mlock() errors and do not error out

sodium_mlock() seems to fail consistently on the Github CI. Perhaps
[sodium_mlock()](https://libsodium.gitbook.io/doc/memory_management#text-locking-memory)
is called too often or with too much memory by the runners so
that this starts failing.

Let's just try to catch this and skip the test, when this starts
happening.

closes: #12751
2023-08-09 18:16:16 +02:00
Christian Brabandt
84bc00e9b5
patch 9.0.1679: Cleanup Tests from leftover files
Problem:    Tests may leave leftover files around
Solution:   Clean up tests and remove files

There were a few failures in 'linux (huge, gcc, testgui, true, true)'
e.g. here: https://github.com/vim/vim/actions/runs/5497376153/jobs/10018060156

,----
| Error detected while processing command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[585]..function RunTheTest[54]..Test_lvimgrep_crash[16]..TestTimeout[12]..VimLeavePre Autocommands for "*"..function EarlyExit[7]..FinishTesting:
| line   70:
| E445: Other window contains changes
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txtmalloc(): unsorted double linked list corrupted
`----

Which is puzzling, because the Xtest_stable_xxd file should have been
long gone after test_crypt.vim is run (and definitely no longer be
staying around in test_quickfix.vim).

So try to clean up properly after a test script is run, just in case any
X<file> is still around. During testing, a found a few leftover files,
which I also fixed in the relevant test-file.

Unfortunately, the test workflow 'linux (huge, gcc, testgui, true,
true)' now seems to fail with 'E1230: Encryption: sodium_mlock()' in
test_crypt.vim. Hopefully this is only temporary.
2023-08-08 20:39:55 +02:00
ObserverOfTime
ad34abee25 patch 9.0.1678: blade files are not recognized
Problem:    Blade files are not recognized.
Solution:   Add a pattern for Blade files. (closes #12650)

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-07 03:24:20 +09:00
THARAK HEGDE
4c0089d696 patch 9.0.1677: typo in syntax test input file
Problem:    Typo in syntax test input file.
Solution:   Fix the typo and the expected dump files. (THARAK HEGDE,
            closes #12635)
2023-07-09 02:38:28 +01:00
Bram Moolenaar
16abd997c9 patch 9.0.1676: warning for buffer in use when exiting early
Problem:    Warning for buffer in use when exiting early.
Solution:   Change file names to be able to see what buffer is in use when
            exiting.
2023-07-08 00:54:06 +01:00
Bram Moolenaar
7c2beb48ef patch 9.0.1675: test may run into timeout when using valgrind
Problem:    Test may run into timeout when using valgrind.
Solution:   Use a longer timeout when using valgrind.
2023-07-08 00:25:56 +01:00
Bram Moolenaar
416bd916b4 patch 9.0.1674: help for builtin functions is not sorted properly
Problem:    Help for builtin functions is not sorted properly.
Solution:   Put err_teapot() help in the right position.
2023-07-07 23:19:18 +01:00
Bram Moolenaar
80adaa8ae8 patch 9.0.1673: cannot produce a status 418 or 503 message
Problem:    Cannot produce a status 418 or 503 message.
Solution:   Add err_teapot().
2023-07-07 18:57:40 +01:00
zeertzjq
d392a74c5a patch 9.0.1672: tabline highlight wrong after truncated double width label
Problem:    Tabline highlight wrong after truncated double width label.
Solution:   Fill up half a double width character later. (closes #12614)
2023-07-01 20:24:40 +01:00
skywind3000
e7d9ca2b3b patch 9.0.1671: Termdebug: error with more than 99 breakpoints
Problem:    Termdebug: error with more than 99 breakpoints.
Solution:   Use a different sign for breakpoint 100 and over. (closes #12589,
            closes #12588)
2023-06-28 23:27:28 +01:00
Bram Moolenaar
bf5f189e44 patch 9.0.1670: resetting local option to global value is inconsistent
Problem:    Resetting local option to global value is inconsistent.
Solution:   Handle "<" specifically for 'scrolloff' and 'sidescrolloff'.
            (closes #12594)
2023-06-27 21:51:07 +01:00
Christian Brabandt
19e6c4fd2d patch 9.0.1669: Crash syncing swapfile in new buffer when using sodium crypt
Problem:    Crash syncing swapfile in new buffer when using sodium crypt.
            (James McCoy)
Solution:   Add checks for sodium encryption. (Christian Brabandt,
            closes #12591, closes #12585)
2023-06-27 18:57:10 +01:00
ObserverOfTime
0256d76a33 patch 9.0.1668: PEM files are not recognized
Problem:    PEM files are not recognized.
Solution:   Add patterns to match PEM files. (closes #12582)
2023-06-26 22:05:37 +01:00
zeertzjq
e429893741 patch 9.0.1667: regression test doesn't fail when fix is reverted
Problem:    Regression test doesn't fail when fix is reverted.
Solution:   Add "n" to 'cpoptions' instead of using :winsize. (closes #12587,
            issue #12528)
2023-06-26 19:02:43 +01:00
Christian Brabandt
a2a90d5e20 patch 9.0.1666: compiler may warn for uninitialized variable
Problem:    Compiler may warn for uninitialized variable.
Solution:   Initialize this_props_len. (Christian Brabandt, closes #12599)
2023-06-26 18:48:09 +01:00
Christian Brabandt
590aae3557 patch 9.0.1665: empty CmdlineEnter autocommand causes errors in Ex mode
Problem:    Empty CmdlineEnter autocommand causes errors in Ex mode.
Solution:   Save and restore ex_pressedreturn. (Christian Brabandt,
            closes # 12581, closes #12578)
2023-06-25 22:34:22 +01:00
fullwaywang
8154e642aa patch 9.0.1664: divide by zero when scrolling with 'smoothscroll' set
Problem:    Divide by zero when scrolling with 'smoothscroll' set.
Solution:   Avoid using a negative width. (closes #12540, closes #12528)
2023-06-24 21:58:09 +01:00
Christian Brabandt
c9a4a8ab28 patch 9.0.1663: Termdebug on MS-Windows: some file names are not recognized
Problem:    Termdebug on MS-Windows: some file names are not recognized.
Solution:   Do not always change \t and \n. (Christian Brabandt,
            closes #12565, closes #12560, closes #12550)
2023-06-24 20:02:25 +01:00
Bram Moolenaar
4e2406c7a9 patch 9.0.1662: crash when using a class member twice
Problem:    Crash when using a class member twice. (Christian J. Robinson)
Solution:   Make a copy of the value.
2023-06-24 19:22:21 +01:00
Son Luong Ngoc
b46e0f3263 patch 9.0.1661: BUCK files are not recognized
Problem:    BUCK files are not recognized.
Solution:   Recognize BUCK files as "bzl". (Son Luong Ngoc, closes #12564)
2023-06-24 17:11:04 +01:00
Yegappan Lakshmanan
2d8e998544 patch 9.0.1660: error for using matchfuzzy() returning a list of dicts
Problem:    Error for using matchfuzzy() in Vim9 script returning a list of
            dicts.
Solution:   Make return type of matchfuzzy() list<any>. (Yegappan Lakshmanan,
            closes #12574)
2023-06-24 16:42:25 +01:00