Commit Graph

699 Commits

Author SHA1 Message Date
zeertzjq
84646b80f3 vim-patch:8.2.2713: folding code not sufficiently tested
Problem:    Folding code not sufficiently tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#8064)

68ffe8cade
2022-11-25 15:55:43 +08:00
zeertzjq
ba360a26a2 vim-patch:8.2.2684: not enough folding code is tested
Problem:    Not enough folding code is tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#8046)

5c504f680e

Reorder test_fold.vim to match upstream.
Cherry-pick Test_fold_expr_error() from patch 8.2.0633.
Cherry-pick syntax feature check from patch 8.2.1432.
Cherry-pick a delete() call from patch 8.2.2112.
2022-11-25 15:50:34 +08:00
zeertzjq
a98970219d vim-patch:8.2.4062: match highlighting of tab too short
Problem:    Match highlighting of tab too short.
Solution:   Do not stop match highlighting if on a Tab. (Christian Brabandt,
            closes vim/vim#9507, closes vim/vim#9500)

0bbca540f7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-24 19:10:00 +08:00
zeertzjq
e38ae3b74f vim-patch:8.2.3940: match highlight disappears when doing incsearch for ":s/pat"
Problem:    Match highlight disappears when doing incsearch for ":s/pat".
Solution:   Only use line limit for incsearch highlighting. (closes vim/vim#9425)

94fb8274ca

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-24 19:03:23 +08:00
zeertzjq
81c87857f6 vim-patch:8.2.3698: match highlighting continues over breakindent
Problem:    Match highlighting continues over breakindent.
Solution:   Stop before the end column. (closes vim/vim#9242)

0c359af5c0

Cherry-pick Test_matchdelete_redraw() from patch 8.2.1077.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-24 18:52:27 +08:00
dundargoc
5eb5f49488
test: simplify platform detection (#21020)
Extend the capabilities of is_os to detect more platforms such as
freebsd and openbsd. Also remove `iswin()` helper function as it can be
replaced by `is_os("win")`.
2022-11-22 08:13:30 +08:00
dundargoc
736c36c02f
test: introduce skip() #21010
This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.

Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.
2022-11-13 05:52:19 -08:00
zeertzjq
2425fe2dc5
vim-patch:8.2.2207: illegal memory access if popup menu items are changed (#21028)
Problem:    Illegal memory access if popup menu items are changed while the
            menu is visible. (Tomáš Janoušek)
Solution:   Make a copy of the text. (closes vim/vim#7537)

38455a9213

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-12 09:57:29 +08:00
zeertzjq
01ccfb40e3 vim-patch:8.2.1106: crash when trying to use s: variable in typed command
Problem:    Crash when trying to use s: variable in typed command.
Solution:   Don't use the script index when not set. (Ken Takata,
            closes vim/vim#6366)

8e6cbb7232
2022-11-05 21:38:36 +08:00
zeertzjq
6374120558 vim-patch:8.2.4501: with 'showbreak' set cursor displayed in wrong position
Problem:    With 'showbreak' set and after the end of the line the cursor
            may be displayed in the wrong position.
Solution:   Do not apply 'showbreak' after the end of the line. (closes vim/vim#9884)

21efafe4c2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 19:35:56 +08:00
zeertzjq
2476f41a4a vim-patch:8.2.1022: various parts of code not covered by tests
Problem:    Various parts of code not covered by tests.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#6300)

845e0ee594

Omit test_iminsert.vim: the commit that created this file was N/A.
Omit test_viminfo.vim: the added tests are N/A.
2022-11-04 20:54:50 +08:00
dundargoc
4716a578ae docs: fix typos 2022-11-02 21:45:26 +08:00
zeertzjq
cfccae9584 vim-patch:8.2.0610: some tests are still old style
Problem:    Some tests are still old style.
Solution:   Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5957)

08f4157c5c

Fix missing error message when sort() compare function fails.
Cherry-pick a line in test_utf8.vim from patch 8.2.0448.
Cherry-pick builtin_function() change from patch 8.2.0595.
2022-10-26 20:53:39 +08:00
zeertzjq
7cdaa74b36 vim-patch:9.0.0702: incomplete testing cursor position with 'linebreak' set
Problem:    Incomplete testing cursor position after change with 'linebreak'
            set.
Solution:   Add a test and move test cases together. (closes vim/vim#11313)
30c0c467d6
2022-10-09 19:09:32 +08:00
zeertzjq
25dea99ce5
vim-patch:9.0.0670: no space for command line when there is a tabline (#20512)
Problem:    No space for command line when there is a tabline.
Solution:   Correct computation of where the command line should be.
            (closes vim/vim#11295)
c9f5f73206
2022-10-06 20:03:59 +08:00
luukvbaal
5acf52e19b
feat(window/ui): add splitkeep option (#19243)
vim-patch:9.0.0445: when opening/closing window text moves up/down

Problem:    When opening/closing window text moves up/down.
Solution:   Add the 'splitscroll' option.  When off text will keep its
            position as much as possible.
29ab524358

vim-patch:9.0.0455: a few problems with 'splitscroll'

Problem:    A few problems with 'splitscroll'.
Solution:   Fix 'splitscroll' problems. (Luuk van Baal, closes vim/vim#11117)
5ed391708a

vim-patch:9.0.0461: 'scroll' is not always updated

Problem:    'scroll' is not always updated.
Solution:   Call win_init_size() at the right place.
470a14140b

vim-patch:9.0.0465: cursor moves when cmdwin is closed when 'splitscroll' is off

Problem:    Cursor moves when cmdwin is closed when 'splitscroll' is off.
Solution:   Temporarily set 'splitscroll' when jumping back to the original
            window. (closes vim/vim#11128)
e697d48890

vim-patch:9.0.0469: cursor moves if cmdwin is closed when 'splitscroll' is off

Problem:    Cursor moves if cmdwin is closed when 'splitscroll' is off.
Solution:   Skip win_fix_cursor if called when cmdwin is open or closing.
            (Luuk van Baal, closes vim/vim#11134)
3735f11050

vim-patch:9.0.0478: test for 'splitscroll' takes too much time

Problem:    Test for 'splitscroll' takes too much time.
Solution:   Only test some of the combinations. (Luuk van Baal, closes vim/vim#11139)
594f9e09cd

vim-patch:9.0.0486: text scrolled with 'nosplitscroll', autocmd win and help

Problem:    Text scrolled with 'nosplitscroll', autocmd win opened and help
            window closed.
Solution:   Skip win_fix_scroll() in more situations. (Luuk van Baal,
            closes vim/vim#11150)
d5bc762dea

vim-patch:9.0.0505: various problems with 'nosplitscroll'

Problem:    Various problems with 'nosplitscroll'.
Solution:   Fix 'nosplitscroll' problems. (Luuk van Baal, closes vim/vim#11166)
faf1d412f5

vim-patch:9.0.0555: scrolling with 'nosplitscroll' in callback changing curwin

Problem:    Scrolling with 'nosplitscroll' in callback changing curwin.
Solution:   Invalidate w_cline_row in the right place. (Luuk van Baal,
            closes vim/vim#11185)
20e58561ab

vim-patch:9.0.0603: with 'nosplitscroll' folds are not handled correctly

Problem:    With 'nosplitscroll' folds are not handled correctly.
Solution:   Take care of closed folds when moving the cursor. (Luuk van Baal,
            closes vim/vim#11234)
7c1cbb6cd4

vim-patch:9.0.0605: dump file missing

Problem:    Dump file missing.
Solution:   Add the missing dump file. (issue vim/vim#11234)
439a2ba174

vim-patch:9.0.0647: the 'splitscroll' option is not a good name

Problem:    The 'splitscroll' option is not a good name.
Solution:   Rename 'splitscroll' to 'splitkeep' and make it a string option,
            also supporting "topline". (Luuk van Baal, closes vim/vim#11258)
13ece2ae1d

vim-patch:9.0.0667: ml_get error when 'splitkeep' is "screen"

Problem:    ml_get error when 'splitkeep' is "screen". (Marius Gedminas)
Solution:   Check the botline is not too large. (Luuk van Baal,
            closes vim/vim#11293, closes vim/vim#11292)
346823d3e5
2022-10-06 14:57:52 +08:00
zeertzjq
bc64aa435b
vim-patch:9.0.0665: setting 'cmdheight' has no effect if last window was resized (#20500)
Problem:    Setting 'cmdheight' has no effect if last window was resized.
Solution:   Do apply 'cmdheight' when told to.  Use the frame height instead
            of the cmdline_row.  (closes vim/vim#11286)
0816f473ab
2022-10-06 09:03:49 +08:00
bfredl
6ae4a6e071
Merge pull request #20374 from bfredl/notype
screen: refactor old curwin-heavy logic and graduate "msgsep" feature
2022-10-05 21:50:12 +02:00
bfredl
6ae144a921 feat(messages)!: graduate the 'msgsep' feature
The old behaviour (e.g. via `set display-=msgsep`) will not be available.
Assuming that messages always are being drawn on msg_grid
(or not drawn at all, and forwarded to `ext_messages` enabled UI)
will allows some simplifcations and enhancements moving forward.
2022-10-05 20:12:59 +02:00
zeertzjq
824a31cd0d vim-patch:8.2.3885: arglist test fails
Problem:    Arglist test fails.
Solution:   Adjust for locking the arglist for ":all".
679140c56b
2022-10-05 22:40:28 +08:00
zeertzjq
98bb2c1930 vim-patch:9.0.0661: multi-byte "lastline" in 'fillchars' does not work properly
Problem:    Multi-byte "lastline" item in 'fillchars' does not work properly
            when the window is two columns wide.
Solution:   Compute the text length correctly. (closes vim/vim#11280)
18b3500b8c
2022-10-05 06:59:05 +08:00
zeertzjq
ddc363dce9 vim-patch:9.0.0656: cannot specify another character to use instead of '@'
Problem:    Cannot specify another character to use instead of '@' at the end
            of the window.
Solution:   Add "lastline" to 'fillchars'. (Martin Tournoij, closes vim/vim#11264,
            closes vim/vim#10963)
4ba5f1dab6

Use latest code in drawscreen.c instead.
2022-10-05 06:59:05 +08:00
zeertzjq
cb310d2901 vim-patch:9.0.0622: matchaddpos() can get slow when adding many matches
Problem:    matchaddpos() can get slow when adding many matches.
Solution:   Update the next available match ID when manually picking an ID and
            remove check if the available ID can be used. (idea by Rick Howe)
9f573a8df0
2022-10-02 07:28:38 +08:00
zeertzjq
85c7d4f7a9 vim-patch:9.0.0620: matchaddpos() can only add up to 8 matches
Problem:    matchaddpos() can only add up to 8 matches.
Solution:   Allocate the array of positions. (closes vim/vim#11248)
50faf02f43
2022-10-02 07:28:38 +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
dundargoc
df646572c5
docs: fix typos (#20394)
Co-authored-by: Raphael <glephunter@gmail.com>
Co-authored-by: smjonas <jonas.strittmatter@gmx.de>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-09-30 09:53:52 +02:00
zeertzjq
1d337d4e2f
vim-patch:9.0.0595: extra newline in messages after a verbose shell message (#20359)
Problem:    Extra newline in messages after a verbose shell message.
Solution:   Output the newline with msg_putchar_attr(). (closes vim/vim#11233)
            Make it possible to filter a screendump before comparing it.
1190139ed0

Cherry-pick Test_message_more_scrolledback() from patch 9.0.0592 because
Nvim already behaves as intended.
2022-09-27 08:29:21 +08:00
zeertzjq
9ffa041a9a
vim-patch:9.0.0586: missing change in test (#20347)
Problem:    Missing change in test.
Solution:   Add the test change.
124af71a28

vim-patch:9.0.0585: when long message test fails the error message is not visible

Problem:    When long message test fails the error message is not visible.
Solution:   Dump more lines.
6a879878f4
2022-09-26 07:46:58 +08:00
zeertzjq
ad1f353fe1
vim-patch:9.0.0517: when at the command line :redrawstatus does not work well (#20266)
Problem:    When at the command line :redrawstatus does not work well.
Solution:   Only update the statuslines instead of the screen. (closes vim/vim#11180)
320d910064
2022-09-21 06:47:29 +08:00
zeertzjq
cfdc93e8ac
vim-patch:9.0.0511: unnecessary scrolling for message of only one line (#20261)
Problem:    Unnecessary scrolling for message of only one line.
Solution:   Only set msg_scroll when needed. (closes vim/vim#11178)
bdedd2bcce
2022-09-20 21:58:39 +08:00
zeertzjq
2e4532bea5 vim-patch:9.0.0512: cannot redraw the status lines when editing a command
Problem:    Cannot redraw the status lines when editing a command.
Solution:   Only postpone the redraw when messages have scrolled.
            (closes vim/vim#11170)
c14bfc31d9
2022-09-20 21:01:00 +08:00
zeertzjq
9413f7544b vim-patch:9.0.0507: cmdline cleared when using :redrawstatus in CmdlineChanged
Problem:    Command line cleared when using :redrawstatus in CmdlineChanged
            autocommand event.
Solution:   Postpone the redraw. (closes vim/vim#11162)
bcd6924245

Cherry-pick Test_redraw_in_autocmd() from Vim patch 8.2.4789.
2022-09-20 21:00:45 +08:00
zeertzjq
f19e91acd8
vim-patch:9.0.0457: substitute prompt does not highlight an empty match (#20186)
Problem:    Substitute prompt does not highlight an empty match.
Solution:   Highlight at least one character.
a04f457a6c
2022-09-13 22:08:01 +08:00
zeertzjq
f4274d0f62
vim-patch:8.2.3102: test for crash fix does not fail without the fix (#20018)
Problem:    Test for crash fix does not fail without the fix.
Solution:   Adjust the test sequence. (closes vim/vim#8506)
3777d6e32b

Cherry-pick CheckUnix from patch 8.2.1432.
2022-08-31 09:41:00 +08:00
bfredl
8fd66ff5c5 fix(redraw): handle switching to a tabpage with larger p_ch value 2022-08-29 21:58:07 +02:00
zeertzjq
4ecea0e001 vim-patch:8.2.0911: crash when opening a buffer for the cmdline window fails
Problem:    Crash when opening a buffer for the cmdline window fails. (Chris
            Barber)
Solution:   Check do_ecmd() succeeds.  Reset got_int if "q" was used at the
            more prompt. (closes vim/vim#6211)
9b7cce28d5

Make code match latest Vim instead.
2022-08-25 21:38:11 +08:00
zeertzjq
63df91c10a
vim-patch:8.2.1046: insufficient tests for src/buffer.c (#19903)
Problem:    Insufficient tests for src/buffer.c.
Solution:   Add more tests.  Move comments related tests to a separate file.
            (Yegappan Lakshmanan, closes vim/vim#6325)
b7e2483655
2022-08-23 11:24:46 +08:00
zeertzjq
b7c86e24f7 vim-patch:8.2.0982: insufficient testing for reading/writing files
Problem:    Insufficient testing for reading/writing files.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#6257)
            Add "ui_delay" to test_override() and use it for the CTRL-O test.
b340baed9f

Omit test_override().
Reorder test_writefile.vim to match Vim.
2022-08-19 22:05:26 +08:00
zeertzjq
cf3b871fa9
test: use poke_eventloop() instead of sleep(10) where possible (#19794)
Using sleep(10) to wait for typeahead to finish is flaky, especially on
macOS, where legacy/global_spec.lua has failed several times.
2022-08-16 15:21:46 +08:00
zeertzjq
76b4b1977b vim-patch:8.2.1799: some Normal mode commands not fully tested
Problem:    Some Normal mode commands not fully tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#7073)
d1ad99b654

Cherry-pick test_registers.vim change from patch 8.2.0644.
2022-08-15 20:24:43 +08:00
zeertzjq
55da52963b vim-patch:8.2.5109: mode not updated after CTRL-O CTRL-C in Insert mode
Problem:    Mode not updated after CTRL-O CTRL-C in Insert mode.
Solution:   Set redraw_mode and use it. (closes vim/vim#10581)
7a1d32809b
2022-08-15 17:58:35 +08:00
zeertzjq
93ba821831 vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped Esc
Problem:    Mode is not cleared when leaving Insert mode with mapped Esc.
Solution:   Clear the mode when redraw_cmdline is set. (closes vim/vim#4269)
4c25bd785a
2022-08-15 17:58:35 +08:00
zeertzjq
53b0688ac0 vim-patch:8.1.1189: mode is not cleared when leaving Insert mode
Problem:    Mode is not cleared when leaving Insert mode.
Solution:   Clear the mode when got_int is set. (Ozaki Kiichi, closes vim/vim#4270)
abc7c7fc5a
2022-08-15 17:58:35 +08:00
zeertzjq
d31ee6664d
test: increse expect_exit() timeouts (#19680)
A timeout of 100 milliseconds is sometimes still too short for macOS.
Change it to 1000 milliseconds.
2022-08-08 22:04:21 +08:00
zeertzjq
d0686540f5 vim-patch:8.2.1280: Ex command error cannot contain an argument
Problem:    Ex command error cannot contain an argument.
Solution:   Add ex_errmsg() and translate earlier.  Use e_trailing_arg where
            possible.
8930caaa1a

Remove duplicate test file 062_tab_pages_spec.lua
2022-08-07 14:38:57 +08:00
zeertzjq
6963c2bdcd vim-patch:8.2.0815: maparg() does not provide enough information for mapset()
Problem:    maparg() does not provide enough information for mapset().
Solution:   Add "lhsraw" and "lhsrawalt" items.  Drop "simplified"
9c65253fe7

vim-patch:9.0.0127: unused variable

Problem:    Unused variable.
Solution:   Remove the variable. (closes vim/vim#10829)
e95f22f63a
2022-08-01 21:54:18 +08:00
zeertzjq
0ae94a128f test: rewrite Test_missing_attr() in Lua 2022-07-31 08:51:20 +08:00
zeertzjq
f254fc67a5
vim-patch:9.0.0099: scrollback can be wrong after redrawing the command line (#19562)
Problem:    Scrollback can be wrong after redrawing the command line.
Solution:   Clear unfinished scrollback when redrawing. (closes vim/vim#10807)
46af7bc08d
2022-07-28 20:07:32 +08:00
zeertzjq
fc55f8263c vim-patch:9.0.0086: tabline is not redrawn when entering command line
Problem:    Tabline is not redrawn when entering command line.
Solution:   Set "redraw_tabline". (closes vim/vim#10771)
6791adca53
2022-07-27 06:32:40 +08:00
zeertzjq
9f1dc1466e vim-patch:9.0.0082: cannot interrupt global command from command line
Problem:    Cannot interrupt global command from command line.
Solution:   Reset got_int in another place. (closes vim/vim#10739)
3cfae39b08
2022-07-27 06:19:43 +08:00