Problem: CI: tests can be improved
Solution: collect failed indent tests, raise timeout for search()
functions when using ASAN/Valgrind (Aliaksei Budavei)
ASan-instrumented Vim builds tend to run slower (x2) than
non-instrumented Vim builds and occasionally make indent
tests fail when "search*()" functions time out and give up
further execution.
Reference:
https://github.com/google/sanitizers/wiki/AddressSanitizercloses: #15974
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: sway files are not recognized
Solution: detect '*.sw' files as sway filetype, include
a filetype plugin (Riley Bruins)
References:
https://github.com/FuelLabs/sway.
Comments taken from their syntax documentation. File extension taken
from the same documentation/GitHub's own recognition of these file types
closes: #15973
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: too many strlen() calls in register.c
Solution: refactor code, add string_T struct to keep track
of string lengths (John Marriott)
closes: #15952
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: topline might be changed in diff mode unexpectedly
(Jaehwang Jung)
Solution: do not re-calculate topline, when using line() func
in diff mode.
fixes: #15812closes: #15950
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Mac OS tests are too flaky
Solution: Increase max test timeout to 25 minutes,
allow up to 10 retries on Mac OS runners,
refactor runtest.vim (Milly).
closes: #15940
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: need a test for findexpr and vim9 imported func
Solution: Add a test for 'findexpr' and Vim9 imported script
(Yegappan Lakshmanan)
closes: #15954
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: some global functions are only used in single files
Solution: refactor code slightly and make some more functions static
(Yegappan Lakshmanan)
closes: #15951
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: termdebug: cannot evaluate expr in a popup
Solution: enhance termdebug plugin and allow to evaluate expressions in
a popup window, add a unit test (Peter Wolf).
fixes: #15877closes: #15933
Signed-off-by: Peter Wolf <pwolf2310@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: not clear what tests cause asan failures
Solution: append testname to $ASAN_OPTIONS
Mention what test causes ASAN failures by appending the testname
to log_path in $ASAN_OPTIONS/$UBSAN_OPTIONS. This assumes 'log_path' is
always the last sub-option in $ASAN_OPTIONS.
While at it, also make the CI run with `-O0` instead of `-O1` when ASAN
is enable since this causes line numbers to disappear.
closes: #15927
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: "above" virtual text causes wrong 'colorcolumn' position.
(@matrdr)
Solution: Use the number of cells instead of bytes for vcol_off_tp.
(zeertzjq)
fixes: #15946closes: #15948
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: mapset() may remove unrelated mapping whose {rhs} matches the
restored mapping's {lhs}.
Solution: only match by {lhs} when unmapping for mapset() (zeertzjq).
closes: #15935
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: no error handling with setglobal and number types
Solution: validate values when using :setglobal with number option types
(Milly)
closes: #15928
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Coverity warns about dereferencing NULL ptr
in check_colorcolumn()
Solution: verify that wp is not null before accessing it
related: #15914
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Terminal scrollback doesn't shrink when reducing
'termwinscroll'
Solution: Check if option value was decreased (Milly).
closes: #15904
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no error check when setting global 'briopt'
Solution: also parse and check global 'briopt' value (Milly)
closes: #15911
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: minor issues in gen_opt_test.vim
Solution: fix restore value for 'undolevels', fix comment, fix
wrong cpo value, add equality test for global-local options on
switchback (Milly).
closes: #15913
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no error check when setting global 'cc'
Solution: also parse and check global 'cc' value (Milly)
closes: #15914
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no error check when setting global 'isk'
Solution: also parse and check global 'isk' value (Milly)
closes: #15915
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no error check when setting global 'fdm' to empty value
Solution: Also check global 'fdm' value for being empty (Milly).
closes: #15916
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no error check when setting global 'termwinkey'
Solution: Also validate when using setglobal (Milly).
closes: #15917
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no error check when setting global 'termwinsize'
Solution: Also validate when using setglobal (Milly).
closes: #15918
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: too many strlen() calls in cmdhist.c
Solution: refactor code and remove strlen() calls
(John Marriott)
closes: #15888
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: testing of options can be further improved
Solution: split the generated option test into test_options_all.vim,
add more test cases, save and restore values, fix use-after-free
closes: #15894
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: libtool files are not recognized
Solution: detect '*.{lo,la,lai}' as sh filetype
(Wu, Zhenyu)
closes: #15751
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: tests may fail on Windows environment
Solution: use shellcmdflag=/D to skip executing autorun from
the registry (Milly)
closes: #15900
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: xxd: -e does add one extra space
Solution: fix it, refactor and merge some code
(Aapo Rantalainen)
fixes: #15898closes: #15899
Signed-off-by: Aapo Rantalainen <aapo.rantalainen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_set_values() is not comprehensive enough
Solution: Add a lot more test cases (Milly)
closes: #15892
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: errors in gen_opt_test.vim are not shown
Solution: update gen_opt_test.vim and write test.log,
let the makefile output test.log (Milly)
closes: #15887
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Amiga: AmigaOS4 build should use default runtime (newlib)
Solution: Remove clib2 from compiler / linker flags (Ola Söder)
closes: #15890
Signed-off-by: Ola Söder <rolfkopman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: ':resize + 5' has invalid space after '+'
Solution: Correct the test (Milly)
closes: #15884
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: cursor position changed when using hidden terminal
and BufFilePost autocommand (Mizuno Jan Yuta)
Solution: Save and restore cursor position
fixes: #15854closes: #15876
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: quickfix update test does not test location list
(after: v9.1.0.785)
Solution: update Test_quickfix_buffer_contents to test with location
lists (Yegappan Lakshmanan)
closes: #15879
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: cannot preserve error position when setting quickfix lists
Solution: Add the 'u' action for setqflist()/setloclist() and try
to keep the closes target position (Jeremy Fleischman)
fixes: #15839closes: #15841
Signed-off-by: Jeremy Fleischman <jeremyfleischman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: there are several problems with python 3.13
Solution: fix the problems in the python3 interface (Boris Staletic)
This commit does the following things:
1) Since python 3.13.0b1, all statically defined objects are "immortal".
Besides never getting garbage collected, this also affects reference
counting:
- Immportal objects have a reference count of 2^32-1.
- Reference counting is a no-op.
All this is considered implementation details by cpython, so
documentation is next to non-existent.
Relevant CPython source code:
https://github.com/python/cpython/blob/v3.13.0/Include/object.h#L62-L107https://github.com/python/cpython/blob/v3.13.0/Include/object.h#L389-L391
2) Opt-out of ANSI-painted python stack traces
3) Make python error message severity more consistent
fixes: #15838closes: #15842
Signed-off-by: Boris Staletic <boris.staletic@protonmail.com>
Signed-off-by: puremourning <puremourning@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: incorrect Win32 error checking
Solution: fix wrong order of error handling and perform
some minor refactoring (Nir Lichtman)
In the function that adjusts the process privileges there is a mistake
in which GetLastError is called after CloseHandle, though clearly the
last error check is meant for the privileges related call before hand
and the current state appears like a mistake.
So fix this problem, and also perform the following:
- Remove the static variable done since the PlatformId is only called
during initialization
- Fix incorrect parameter passed to the Win32 API privileges function
closes: #15845
Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: lf config files are not recognized
Solution: detect lfrc files as lf filetype, include a syntax
script for lf files (Andis Spriņķis).
References:
- https://github.com/gokcehan/lfcloses: #15859
Signed-off-by: Andis Spriņķis <spr.andis@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>