Commit Graph

648 Commits

Author SHA1 Message Date
zeertzjq
fe159d23fd
vim-patch:9.0.0071: command overlaps with printed text in scrollback (#19505)
Problem:    Command overlaps with printed text in scrollback.
Solution:   Clear until end-of-line and use correct message chunk.
            (closes vim/vim#10765, closes vim/vim#10764)
ecdc82e74e

N/A patches for version.c:

vim-patch:9.0.0070: using utfc_ptr2char_len() when length is negative

Problem:    Using utfc_ptr2char_len() when length is negative.
Solution:   Check value of length. (closes vim/vim#10760)
4dc513a22c
2022-07-26 07:30:33 +08:00
zeertzjq
72dfd57e5f test: deal with RPC call causing Nvim to exit later 2022-07-19 19:41:07 +08:00
zeertzjq
366e90cdc8 test: avoid timing-sensitive undo message 2022-07-19 19:41:07 +08:00
zeertzjq
7b835ba796
vim-patch:8.2.1147 (#19425)
vim-patch:8.2.1147: :confirm may happen in cooked mode

Problem:    :confirm may happen in cooked mode. (Jason Franklin)
Solution:   Switch to raw mode before prompting. (Brandon Pfeifer)
27321dbeed

Code is N/A, but this improves tests. Port the improved tests to Lua.
2022-07-19 13:00:22 +08:00
zeertzjq
0cfd4fa8f3 vim-patch:8.2.2643: various code not covered by tests
Problem:    Various code not covered by tests.
Solution:   Add a few more test. (Yegappan Lakshmanan, closes vim/vim#7995)
1f448d906b

Cherry-pick some test_edit.vim changes from patches 8.2.{1022,1432}.
Reorder test_undo.vim to match upstream.
2022-07-16 22:46:54 +08:00
zeertzjq
780edfc0eb vim-patch:8.2.2608: character input not fully tested
Problem:    Character input not fully tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#7963)
f4fcedc59d

Cherry-pick related changes from patches 8.2.{0433,0866}.
2022-07-16 21:55:27 +08:00
zeertzjq
bc73795a58 vim-patch:8.2.0198: no tests for y/n prompt
Problem:    No tests for y/n prompt.
Solution:   Add tests. (Dominique Pelle, closes vim/vim#5564)
43c60eda2a
2022-07-16 21:32:25 +08:00
zeertzjq
f7c6676199 vim-patch:8.2.0052: more-prompt not properly tested
Problem:    More-prompt not properly tested.
Solution:   Add a test case. (Dominique Pelle, closes vim/vim#5404)
c6d539b671
2022-07-16 21:32:25 +08:00
zeertzjq
465b73c3a5 vim-patch:8.2.0482: channel and sandbox code not sufficiently tested
Problem:    Channel and sandbox code not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5855)
ca68ae1311

Cherry-pick test_clientserver.vim changes form patch 8.2.0448.
2022-07-15 10:50:21 +08:00
zeertzjq
c01690b1ea
fix(exmode): flush messages before printing a line after pressing Enter (#19341) 2022-07-13 09:06:31 +08:00
zeertzjq
4aa4675fbf vim-patch:8.2.0293: various Ex commands not sufficiently tested
Problem:    Various Ex commands not sufficiently tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5673)
818fc9ad14

Needs to assert E170 instead of E580 because patch 8.2.3486 has been
ported but patch 8.2.1183 hasn't.
2022-07-12 16:23:32 +08:00
zeertzjq
01afd43bc9 vim-patch:8.2.0275: some Ex code not covered by tests
Problem:    Some Ex code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes vim/vim#5659)
406cd90f19
2022-07-12 16:23:32 +08:00
zeertzjq
1abdb3224b vim-patch:8.2.2732: prompt for s///c in Ex mode can be wrong
Problem:    Prompt for s///c in Ex mode can be wrong.
Solution:   Position the cursor before showing the prompt. (closes vim/vim#8073)
e5b0b98a90
2022-07-12 14:08:34 +08:00
zeertzjq
d079995fb8 vim-patch:8.2.0270: some code not covered by tests
Problem:    Some code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes vim/vim#5649)
bc2b71d44a
2022-07-12 14:08:34 +08:00
zeertzjq
53392f48b1 vim-patch:8.2.0203: :helptags and some other functionality not tested
Problem:    :helptags and some other functionality not tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5567)
e20b9ececa
2022-07-12 11:52:47 +08:00
zeertzjq
27fd17a79c vim-patch:8.2.0243: insufficient code coverage for ex_docmd.c functions
Problem:    Insufficient code coverage for ex_docmd.c functions.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5618)
9f6277bdde

Cherry-pick Test_window_only() from patch 8.2.0203.
Cherry-pick a memory leak fix from patch 8.2.0399.
2022-07-12 05:36:33 +08:00
zeertzjq
8ea09fc908
vim-patch:8.2.4378: incsearch HL broken when calling searchcount in 'tabLine' (#19147)
Problem:    Incsearch highlight broken when calling searchcount() in 'tabLine'
            function. (Mirko Palmer)
Solution:   Save and restore the incsearch state. (Christian Brabandt,
            closes vim/vim#9763, closes vim/vim#9633)
6dd7424c7e
2022-06-29 19:34:37 +08:00
bfredl
e3281d992e fix(tests): check for EOF on exit of nvim properly 2022-06-13 10:15:44 +02:00
zeertzjq
ab1f96e1d5
vim-patch:8.2.5064: no test for what 8.1.0052 fixes (#18881)
Problem:    No test for what 8.1.0052 fixes.
Solution:   Add a test. (closes vim/vim#10531)
3760bfddc4
2022-06-07 00:19:57 +08:00
dundargoc
ff20d40321
docs: fix typos (#18269)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Dan Sully <dan+github@sully.org>
Co-authored-by: saher <msaher.shair@gmail.com>
Co-authored-by: Stephan Seitz <stephan.seitz@fau.de>
Co-authored-by: Benedikt Müller <d12bb@posteo.de>
Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
2022-06-04 11:56:36 +08:00
Javier Lopez
f914b4e7a8
test: fixeol cleanup created files #18785
The async nature of feed_command caused a race condition on the calls
to delete, leaving the files on the root of the repo. Just use os.remove
and no need to wipeout.
2022-05-28 10:34:18 -07:00
Gregory Anders
9e1ee9fb1d
refactor!: delete insertmode (#18547)
Neovim already removed `evim` (or any similar flags). The 'insertmode'
option is a weird remnant, so get rid of it.

The 'insertmode' option is replaced with a script that closely emulates
the option. This script is documented at :help 'insertmode'
2022-05-22 21:20:18 -06:00
bfredl
3c1bc75447 fix(tests): fix some screen.lua warnings 2022-05-21 23:07:34 +02:00
Famiu Haque
bbf58e6bbc refactor(ui)!: link VertSplit to Normal by default
Avoids using `gui=reverse` on `VertSplit` and makes window separators
look much nicer by default.
2022-05-15 22:37:35 +06: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
zeertzjq
65df08aade test: convert two statusline oldtests to Lua screen tests 2022-05-10 08:15:46 +08:00
zeertzjq
2ba539f449
fix(input): only disable mapped CTRL-C interrupts when getting input (#18310) 2022-04-30 13:11:35 +08:00
zeertzjq
68ddbdd03b test(old): revert changes from ed88ca7503
Copy test_regex_char_classes.vim from upstream to avoid future encoding
problems.
2022-04-29 15:51:03 +08:00
zeertzjq
519e4c4472 test: correct order of arguments to eq() and neq() 2022-04-26 11:38:58 +08:00
zeertzjq
48a35106ef vim-patch:8.2.4818: no test for what 8.2.4806 fixes
Problem:    No test for what 8.2.4806 fixes.
Solution:   Add a test. (closes vim/vim#10727)
ac92ab7719

Test cannot be used because it must use test_setmouse(). Use a Lua test.
2022-04-25 07:23:24 +08:00
zeertzjq
c72857d396 vim-patch:8.2.0358: insufficient testing for indent.c
Problem:    Insufficient testing for indent.c.
Solution:   Add indent tests. (Yegappan Lakshmanan, closes vim/vim#5736)
bd7206e02c

Cherry-pick Test_ex_mode() changes from Vim patches 8.2.{0342,0347}.
Reorder test_expand_func.vim to match upstream.
2022-04-21 07:24:47 +08:00
zeertzjq
2a2c4e191f
vim-patch:8.2.4718: @@@ in the last line sometimes drawn in the wrong place (#18055)
Problem:    @@@ in the last line sometimes drawn in the wrong place.
Solution:   Make sure the column is valid. (closes vim/vim#10130)
cee9c844f2
2022-04-10 04:50:49 +08:00
bfredl
402a71ff87
Merge pull request #17335 from famiu/fix/ui/win-resize
fix: Make window resize commands manage cmdheight
2022-04-05 19:34:06 +02:00
bfredl
6dc31eea43 fix(tests): update legacy tab switch test to be sane 2022-04-05 16:50:11 +02:00
Famiu Haque
463174b5d7 fix(ui): make window resize commands manage cmdheight
Previously, the window resize commands did not resize the value of `cmdheight` when they caused a change in the topframe height, leaving a gap between the end of topframe and the start of the command line, this commit fixes that by making window resize commands automatically change the value of cmdheight if the resize affects the height of topframe.
2022-04-05 16:50:07 +02:00
zeertzjq
969d600f2a
vim-patch:8.2.{4692,4691,4690}: fix Insert mode <LeftDrag> mapping bug (#17999)
vim-patch:8.2.4692: no test for what 8.2.4691 fixes

Problem:    No test for what 8.2.4691 fixes.
Solution:   Add a test.  Use a more generic sotlution. (closes vim/vim#10090)
0f68e6c07a

Test cannot be used because it must use test_setmouse(). Use a Lua test.

Reverted patches:

vim-patch:8.2.4691: solution for <Cmd> in a mapping causes trouble

Problem:    Solution for <Cmd> in a mapping causes trouble.
Solution:   Use another solution: put back CTRL-O after reading the <Cmd>
            sequence.
ca9d8d2cb9

vim-patch:8.2.4689: using <Cmd> in a mapping does not work for mouse keys

Problem:    Using <Cmd> in a mapping does not work for mouse keys in Insert
            mode. (Sergey Vlasov)
Solution:   When reading the <Cmd> argument do not use the stuff buffer.
            (closes vim/vim#10080)
d0fb2d8041
2022-04-05 21:38:53 +08:00
Shougo
e9e16655af
[RFC] vim-patch:8.1.1378: delete() can not handle a file name that looks li… (#16268)
Problem:    Delete() can not handle a file name that looks like a pattern.
Solution:   Use readdir() instead of appending "/*" and expanding wildcards.
            (Ken Takata, closes vim/vim#4424, closes vim/vim#696)
701ff0a3e5

Cherry-pick a change to Test_delete_rf() from patch 8.1.1921.

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-04-03 20:27:46 +08:00
zeertzjq
8a6cf51a71
vim-patch:8.2.3122: with 'nowrap' cursor position is unexected in narrow window (#17935)
Problem:    With 'nowrap' cursor position is unexected in narrow window.
            (Leonid V.  Fedorenchik)
Solution:   Put cursor on the last non-empty line. (closes vim/vim#8525)
30441bb3d5
2022-04-01 07:11:38 +08:00
zeertzjq
86f81c471a vim-patch:8.2.4577: message test is flaky
Problem:    Message test is flaky. (Elimar Riesebieter)
Solution:   Trigger the autocommand event only after startup is finished.
9323ca51c2
2022-03-31 10:05:26 +08:00
zeertzjq
5a3a1304e1 vim-patch:8.2.4200: some tests do not clean up properly
Problem:    Some tests do not clean up properly.
Solution:   Delete created files. (Yegappan Lakshmanan, closes vim/vim#9611)
7e765a39b7

Omit test_filetype.vim: already ported
Omit test_vim9_import.vim: N/A
2022-03-31 10:05:26 +08:00
zeertzjq
d5dee83552 vim-patch:8.2.4156: fileinfo message overwrites echo'ed message
Problem:    Fileinfo message overwrites echo'ed message.
Solution:   Reset need_fileinfo when displaying a message. (Rob Pilling,
            closes vim/vim#9569)
726f7f91fd
2022-03-31 10:05:26 +08:00
zeertzjq
47630743fc vim-patch:8.2.1844: using "q" at the more prompt doesn't stop a long message
Problem:    Using "q" at the more prompt doesn't stop a long message.
Solution:   Check for "got_int". (closes vim/vim#7122)
3d30af8783

Cherry-pick file name change from patch 8.2.2112.
2022-03-31 10:05:26 +08:00
Justin M. Keyes
72652cbc46
feat(test): use nvim_exec in helpers.source() #16064
helpers.source() was a hack to work around the lack of anonymous
:source. Its "create tempfile" behavior is not a required part of most
tests that use it.

Some tests still need the old "create tempfile" behavior either because
they test SID behavior, or because of missing nvim_exec features: #16071
2022-03-27 10:25:55 -07:00
zeertzjq
9530c2d6d8
vim-patch:8.2.4626: Visual area not updated when removing sign in Visual mode (#17864)
Problem:    Visual area not fully updated when removing sign in Visual mode
            while scrolling.
Solution:   Adjust check for topline. (closes vim/vim#10017)
abb6fbd14d
2022-03-26 08:52:54 +08:00
bfredl
ed88ca7503 feat(input): enable <tab>/<c-i>, <cr>/<c-m>, <esc>/<c-[> pairs unconditionally 2022-03-24 11:02:39 +01:00
zeertzjq
d7488bf386 feat(input)!: delay some conversions to vgetc() 2022-03-24 11:02:39 +01:00
zeertzjq
0442635a50 test(autochdir_spec): use better patterns 2022-03-07 06:43:03 +08:00
zeertzjq
eb70540ff0 vim-patch:8.2.4513: window-local directory is not applied if 'acd' fails
Problem:    Window-local directory is not applied if 'acd' fails.
Solution:   Don't call do_autochdir(). (closes vim/vim#9891)
b29ae15977
2022-03-07 06:43:03 +08:00
zeertzjq
da9bc96152 vim-patch:8.2.3920: restoring directory after using another window is inefficient
Problem:    Restoring directory after using another window is inefficient.
Solution:   Only restore the directory for win_execute().  Apply 'autochdir'
            only when needed.
90c317f224
2022-03-07 06:43:03 +08:00
zeertzjq
8262de0b48 vim-patch:8.2.3739: in wrong directory when using win_execute() with 'acd' set
Problem:    In wrong directory when using win_execute() with 'acd' set.
Solution:   Restore the directory when returning to the window. (closes vim/vim#9276)
dea4a61637
2022-03-07 06:43:03 +08:00