Commit Graph

21 Commits

Author SHA1 Message Date
bfredl
b556bd1a53 refactor(tests): use global defaults instead of set_default_attr_ids (2) 2024-03-27 12:32:53 +01:00
zeertzjq
31b3c62845 vim-patch:9.1.0106: Visual highlight hard to read with 'termguicolors'
Problem:  Visual highlight hard to read with 'termguicolors'
          (Maxim Kim)
Solution: Set Visual GUI foreground to black (with background=light)
          and lightgrey (with background=dark)
          (Maxim Kim)

fixes: vim/vim#14024
closes: vim/vim#14025

34e4a05d02

Co-authored-by: Maxim Kim <habamax@gmail.com>
2024-02-15 10:50:29 +08:00
Lewis Russell
795f896a57 test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
Justin M. Keyes
04f2f864e2 refactor: format test/* 2024-01-03 02:09:29 +01:00
zeertzjq
1037ce2e46 test: avoid repeated screen lines in expected states
This is the command invoked repeatedly to make the changes:

    :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
2023-12-09 22:15:02 +08:00
zeertzjq
7542286d6a
vim-patch:9.0.1697: incsearch test not sufficient (#24683)
Problem: incsearch test not sufficient (after 9.0.1691)
Solution: add an additional test

73b8209266

Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-08-13 07:10:24 +08:00
zeertzjq
8f9c5ee5ef
vim-patch:9.0.1691: wrong viewport restored for incsearch and smoothscroll (#24667)
Problem: wrong viewport restored for incsearch and smoothscroll
Solution: Save and restore skipcol as well

closes: vim/vim#12713

7b7b4cb6f2
2023-08-12 06:32:13 +08:00
zeertzjq
968cd1ed93 vim-patch:9.0.1309: scrolling two lines with even line count and 'scrolloff' set
Problem:    Scrolling two lines with even line count and 'scrolloff' set.
Solution:   Adjust how the topline is computed. (closes vim/vim#10545)

1d6539cf36

Cherry-pick test_scroll_opt.vim changes from patch 8.2.1432.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-16 08:09:41 +08:00
zeertzjq
46e4be0fd0 vim-patch:8.2.2295: incsearch does not detect empty pattern properly
Problem:    Incsearch does not detect empty pattern properly.
Solution:   Return magic state when skipping over a pattern. (Christian
            Brabandt, closes vim/vim#7612, closes vim/vim#6420)

d93a7fc1a9
2022-12-04 10:07:05 +08:00
zeertzjq
9353e2f7ef
vim-patch:8.2.2542: highlight of char beyond line end is not correct (#20424)
Problem:    Highlight of char beyond line end is not correct. (Chuan Wei Foo)
Solution:   Fix counting NUL as one cell.  Draw one more character if the EOL
            is part of the match. (closes vim/vim#7883)
41f0895c6e

Reorder test_search.vim to match Vim.
2022-10-01 21:29:54 +08:00
zeertzjq
c196119acb
vim-patch:8.2.2797: Search highlight disappears in the Visual area (#17947)
Problem:    Search highlight disappears in the Visual area.
Solution:   Combine the search attributes. (closes vim/vim#8134)
2d5f385cee
2022-05-13 21:20:15 +08:00
Björn Linse
07cc231142 A Mudholland Dr. Recast
The commit summary maybe does not make sense, but calling a function
that does not wait on anything `wait()` makes even less sense.
2020-10-19 21:48:06 +02:00
Aufar Gilbran
77bb48e740 vim-patch:8.1.0295: no 'incsearch' highlighting for :vimgrep and similar
Problem:    No 'incsearch' highlighting for :vimgrep and similar commands.
Solution:   Parse the :vimgrep command and similar ones to locate the search
            pattern. (Hirohito Higashi, closes vim/vim#3344)
264cf5cfaf
2020-09-11 10:33:20 +08:00
Aufar Gilbran
ab7e101540 vim-patch:8.1.0291: 'incsearch' highlighting not used for :sort
Problem:    'incsearch' highlighting not used for :sort.
Solution:   Handle pattern in :sort command.
81f56536b1
2020-09-11 10:33:20 +08:00
Björn Linse
4987311fb5 tests/ui: remove unnecessary screen:detach()
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.

This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).

Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
2019-10-13 22:10:42 +02:00
Björn Linse
a330129a28 tests/ui: cleanup illegitimate usages of "attr_ignore"
"attr_ignore" is an anti-pattern, with snapshot_util()
just include all the highlights already.
2019-10-13 22:10:42 +02:00
Björn Linse
c8810a51a3 tests: improve robustness of immediate successes in screen tests 2018-10-15 20:13:11 +02:00
Justin M. Keyes
7d12597d29 vim-patch:8.0.0692: CTRL-G with 'incsearch' and ? goes in the wrong direction
Problem:    Using CTRL-G with 'incsearch' and ? goes in the wrong direction.
            (Ramel Eshed)
Solution:   Adjust search_start. (Christian Brabandt)

da5116da45
2018-02-11 15:27:56 +01:00
James McCoy
54d5e90a2b
vim-patch:7.4.2320
Problem:    Redraw problem when using 'incsearch'.
Solution:   Save the current view when deleting characters. (Christian
            Brabandt) Fix that the '" mark is set in the wrong position. Don't
            change the search start when using BS.

dda933d06c
2017-06-26 22:08:13 -04:00
James McCoy
0dd6455659
vim-patch:7.4.2268
Problem:    Using CTRL-N and CTRL-P for incsearch shadows completion keys.
Solution:   Use CTRL-T and CTRL-G instead.

1195669f9e
2017-06-26 22:08:11 -04:00
James McCoy
518b42db91
functests/legacy: Add lua version of test_search.vim 2017-06-26 22:07:28 -04:00