Commit Graph

266 Commits

Author SHA1 Message Date
zeertzjq
413d57ae71
vim-patch:partial:9.0.1570: some tests are slow (#23688)
Problem:    Some tests are slow.
Solution:   Make a few test cases faster.

bf63011a52

Cherry-pick related test_cmdline.vim changes from patch 9.0.0418.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-20 08:21:48 +08:00
Luuk van Baal
cf0f83ebf0 vim-patch:9.0.1568: with 'smoothscroll' cursor may move below botline
Problem:    With 'smoothscroll' cursor may move below botline.
Solution:   Call redraw_later() if needed,  Compute cursor row with adjusted
            condition. (Luuk van Baal, closes vim/vim#12415)

d49f646bf5
2023-05-19 19:28:01 +02:00
Christian Clason
201f366b37
vim-patch:9.0.1565: json lines files are not recognized (#23677)
Problem:    Json lines files are not recognized.
Solution:   Add a pattern to detect "jsonl" files. (issue vim/vim#7520)

6fadbc1e8c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-19 09:11:22 +02:00
zeertzjq
66b7f62542
vim-patch:8.2.2858: test fails because of changed error message (#23647)
Problem:    Test fails because of changed error message.
Solution:   Adjust the expected error message.

6b02b38ed0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-16 10:00:40 +08:00
luukvbaal
5887ecab6d
vim-patch:9.0.1561: display wrong when moving cursor to above the top line (#23644)
Problem:    Display wrong when moving cursor to above the top line and
            'smoothscroll' is set.
Solution:   Call adjust_skipcol() in more places and make it work better.
            (Luuk van Baal, closes vim/vim#12395)

798fa76dbf
2023-05-16 07:56:06 +08:00
zeertzjq
4a0005aee9
vim-patch:9.0.1555: setcharsearch() does not clear last searched char properly (#23631)
Problem:    setcharsearch() does not clear last searched char properly.
Solution:   Do not accept lastc_bytelen smaller than one. (closes vim/vim#12398)

e5d91ba1de
2023-05-15 08:04:23 +08:00
luukvbaal
edfa8d6f2f
vim-patch:9.0.1551: position of marker for 'smoothscroll' not computed correctly (#23617)
Problem:    Position of marker for 'smoothscroll' not computed correctly.
Solution:   Take 'list' and other options into account. (Luuk van Baal,
            closes vim/vim#12393)

24b62ec825
2023-05-14 06:03:03 +08:00
zeertzjq
cd9ca700e5 vim-patch:9.0.0598: using negative array index with negative width window
Problem:    Using negative array index with negative width window.
Solution:   Make sure the window width does not become negative.

8279af514c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
2de3362ce3 vim-patch:9.0.0492: cmdwin test fails on MS-Windows
Problem:    Cmdwin test fails on MS-Windows.
Solution:   Skip test on MS-Windows.

312af65d1a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
7eea6b12f9 vim-patch:9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Problem:    Using freed memory with cmdwin and BufEnter autocmd.
Solution:   Make sure pointer to b_p_iminsert is still valid.

1c3dd8ddcb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
f80cf0f84f vim-patch:9.0.0249: no test for what 9.0.0234 fixes
Problem:    No test for what 9.0.0234 fixes.
Solution:   Add a test. (issue vim/vim#10950)

3a7ad904d2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
4111530806 vim-patch:9.0.0218: reading before the start of the line
Problem:    Reading before the start of the line.
Solution:   When displaying "$" check the column is not negative.

e98c88c44c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
c8dc34795b vim-patch:9.0.0064: confusing error when using "q:" in command line window
Problem:    Confusing error when using "q:" in command line window.
Solution:   Check for the situation and give a better error message.
            (closes vim/vim#10756)

c963ec31a0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:57 +08:00
Christian Clason
6f29c68928
vim-patch:9.0.1549: USD filetype is not recognized (#23608)
Problem:    USD filetype is not recognized.
Solution:   Add patterns for USD filetype. (Colin Kennedy, closes vim/vim#12370)

b848ce6b7e

Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
2023-05-13 15:00:08 +02:00
zeertzjq
f76e1ac92e
vim-patch:9.0.1546: some commands for opening a file don't use 'switchbuf' (#23600)
Problem:    Some commands for opening a file don't use 'switchbuf'.
Solution:   Use 'switchbuf' for more commands. (Yegappan Lakshmanan,
            closes vim/vim#12383, closes vim/vim#12381)

54be5fb382

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-13 08:40:06 +08:00
luukvbaal
a6d63591f1
vim-patch:9.0.1545: text not scrolled when cursor moved with "g0" and "h" (#23599)
Problem:    Text not scrolled when cursor moved with "g0" and "h".
Solution:   Adjust w_skipcol when needed. (Luuk van Baal, closes vim/vim#12387)

8667a5678f
2023-05-13 08:15:01 +08:00
zeertzjq
d6e898b44f
Merge pull request #23558 from luukvbaal/smoothscroll
vim-patch:9.0.{1530,1533,1542,1543}
2023-05-12 07:24:13 +08:00
Luuk van Baal
6f41eaa2b5 vim-patch:9.0.1543: display errors when making topline shorter
Problem:    Display errors when making topline shorter and 'smoothscroll' is
            set.
Solution:   Reset w_skipcol when the topline becomes shorter than its current
            value. (Luuk van Baal, closes vim/vim#12367)

5d01f86d99
2023-05-11 20:57:36 +02:00
Luuk van Baal
15c684b358 vim-patch:9.0.1542: line not fully displayed if it doesn't fit in the screen
Problem:    Line not fully displayed if it doesn't fit in the screen.
Solution:   Do not reset s_skipcol if not needed. (Luuk van Baal,
            closes vim/vim#12376)

6c018680be
2023-05-11 20:57:31 +02:00
Gaétan Lepage
e90b506903
vim-patch:9.0.1539: typst filetype is not recognized (#23578)
Problem:    Typst filetype is not recognized.
Solution:   Distinguish between sql and typst. (Gaetan Lepage, closes vim/vim#12363)

4ce1bda869
2023-05-11 15:43:02 +08:00
zeertzjq
9d306ac6b7
vim-patch:9.0.1538: :wqall does not trigger ExitPre (#23574)
Problem:    :wqall does not trigger ExitPre. (Bart Libert)
Solution:   Move preparations for :qall to a common function. (closes vim/vim#12374)

411da64e77

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-11 08:09:13 +08:00
Luuk van Baal
d5780e133a vim-patch:9.0.1533: test for 'smoothscroll' is ineffective
Problem:    Test for 'smoothscroll' is ineffective.
Solution:   Change the order of testing "zb" and "zt". (Luuk van Baal,
            closes vim/vim#12366)

6f37e530d3
2023-05-09 22:53:08 +02:00
Luuk van Baal
1caad791b4 vim-patch:9.0.1530: cursor moves to wrong line when 'foldmethod' is "diff"
Problem:    Cursor moves to wrong line when 'foldmethod' is "diff". (Rick
            Howe)
Solution:   Adjust logic for scrolling. (Luuk van Baal, closes vim/vim#12364,
            closes vim/vim#12218)

aa6ba308a1
2023-05-09 22:40:24 +02:00
zeertzjq
84378c4dd5
test(old): remove python2 tests (#23547)
Because python2 provider is no longer supported.
2023-05-09 09:18:21 +08:00
luukvbaal
44fc2a6d7e
vim-patch:9.0.1525: 'smoothscroll' does not always work properly (#23544)
Problem:    'smoothscroll' does not always work properly.
Solution:   Do not reset w_skipcol after it was intentionally set.  (Luuk van
            Baal, closes vim/vim#12360, closes vim/vim#12199, closes vim/vim#12323)

3ce8c38915
2023-05-09 07:44:31 +08:00
zeertzjq
625926f729 vim-patch:9.0.1524: passing -1 for bool is not always rejected
Problem:    Passing -1 for bool is not always rejected.
Solution:   Check for error in a better way. (closes vim/vim#12358)

8cf51376b8
2023-05-08 22:53:43 +08:00
zeertzjq
d745433817 vim-patch:9.0.1522: some functions give two error messages
Problem:    Some functions give two error messages.
Solution:   Do not give a second error message. (closes vim/vim#12352)

e4098457ab

It seems that tv_get_bool() is actually not exactly the same as
tv_get_number(), so change it to a function instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 22:49:32 +08:00
zeertzjq
5844af0d52 vim-patch:9.0.1521: failing redo of command with control characters
Problem:    Failing redo of command with control characters.
Solution:   Use AppendToRedobuffLit() for colon commands. (closes vim/vim#12354)

30b6d6104c
2023-05-08 01:12:09 +08:00
zeertzjq
3233137813 vim-patch:9.0.1516: cannot use special keys in <Cmd> mapping
Problem:    Cannot use special keys in <Cmd> mapping.
Solution:   Do allow for special keys in <Cmd> and <ScriptCmd> mappings.
            (closes vim/vim#12326)

3ab3a86481
2023-05-08 01:12:09 +08:00
zeertzjq
29c228dc10 vim-patch:8.2.3887: E1135 is used for two different errors
Problem:    E1135 is used for two different errors.
Solution:   Renumber one error.

806da5176e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 01:12:09 +08:00
zeertzjq
f7c1e460f8 vim-patch:8.2.2062: <Cmd> does not handle CTRL-V
Problem:    <Cmd> does not handle CTRL-V.
Solution:   Call get_literal() after encountering CTRL-V. (closes vim/vim#7387)

4a44120e3d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 01:12:09 +08:00
zeertzjq
a2b9117ca8 vim-patch:8.2.1978: making a mapping work in all modes is complicated
Problem:    Making a mapping work in all modes is complicated.
Solution:   Add the <Cmd> special key. (Yegappan Lakshmanan, closes vim/vim#7282,
            closes 4784, based on patch by Bjorn Linse)

957cf67d50

Change docs to match Vim if it's wording is better.
Change error numbers to match Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 01:12:08 +08:00
zeertzjq
fa1baa9a47
vim-patch:9.0.1520: completion for option name includes all bool options (#23518)
Problem:    Completion for option name includes all bool options.
Solution:   Do not recognize the "noinv" prefix.  Prefix "no" or "inv" when
            appropriate.

048d9d2521

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-07 08:00:08 +08:00
zeertzjq
9e34aa76c1
vim-patch:9.0.1518: search stats not always visible when searching backwards (#23517)
Problem:    Search stats not always visible when searching backwards.
Solution:   Do not display the top/bot message on top of the search stats.
            (Christian Brabandt, closes vim/vim#12322, closes vim/vim#12222)

34a6a3617b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-05-07 07:57:29 +08:00
zeertzjq
e218965338
vim-patch:9.0.1514: test waits unnecessarily long before checking screendump (#23516)
vim-patch:9.0.1514: test waits unnecessarily long before checking screendump

Problem:    Test waits unnecessarily long before checking screendump.
Solution:   Remove TermWait() call.

45fcb7928a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-07 07:20:10 +08:00
Luuk van Baal
8e74569d7e vim-patch:9.0.1513: text scrolls unnecessarily when splitting
Problem:    Text scrolls unnecessarily when splitting and 'splitkeep' is not
            "cursor".
Solution:   Avoid resetting w_skipcol. (Luuk van Baal, closes vim/vim#12334)

b926bf47d6
2023-05-07 00:38:45 +02:00
Luuk van Baal
3b2bd8d69e vim-patch:9.0.1512: inserting lines when scrolling with 'smoothscroll' set
Problem:    Inserting lines when scrolling with 'smoothscroll' set.
Solution:   Adjust line height computation for w_skipcol. (Luuk van Baal,
            closes vim/vim#12350)

c8502f9b88
2023-05-07 00:38:40 +02:00
zeertzjq
ca5a810c4a
vim-patch:9.0.1511: crash when using wrong arg types to assert_match() (#23507)
Problem:    Crash when using wrong arg types to assert_match().
Solution:   Check for NULL pointer. (closes vim/vim#12349)

12e7a1fe75
2023-05-06 20:00:17 +08:00
zeertzjq
f6cc0f614f vim-patch:8.2.2610: mouse click test fails when using remote connection
Problem:    Mouse click test fails when using remote connection.
Solution:   Use a larger 'mousetime'. (Dominique Pellé, closes vim/vim#7968)

1e448465e1
2023-05-06 10:03:40 +08:00
zeertzjq
4a4b10d9b6 vim-patch:8.2.2249: termcodes test is flaky when used over ssh
Problem:    Termcodes test is flaky when used over ssh with X forwarding.
Solution:   Set 'mousetime' to a larger value. (Dominique Pellé, closes vim/vim#7576,
            closes vim/vim#7563)

2a5c61a019
2023-05-06 10:03:39 +08:00
zeertzjq
e8661133c5
vim-patch:9.0.0904: various comment and indent flaws (#23498)
Problem:    Various comment and indent flaws.
Solution:   Improve comments and indenting.

88456cd3c4

Omit test_function_lists.vim change as that file is likely not
applicable to Nvim due to the existence of Nvim-only functions.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-06 09:34:29 +08:00
zeertzjq
b99f13385c
vim-patch:8.2.1746: Vim9: cannot use "fina" for "finally" (#23497)
Problem:    Vim9: Cannot use "fina" for "finally". (Naruhiko Nishino)
Solution:   Specifically check for "fina". (closes vim/vim#7020)

373863ed48

:final is N/A.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-06 08:56:00 +08:00
zeertzjq
6b912dec8e vim-patch:9.0.1508: catch does not work when lines are joined with a newline
Problem:    Catch does not work when lines are joined with a newline.
Solution:   Set "nextcmd" appropriately. (closes vim/vim#12348)

f2588b6fc9
2023-05-06 07:47:43 +08:00
zeertzjq
ad7f9a701c vim-patch:8.2.2141: a user command with try/catch may not catch an expression error
Problem:    A user command with try/catch may not catch an expression error.
Solution:   When an expression fails check for following "|". (closes vim/vim#7469)

8143a53c53

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-06 07:47:43 +08:00
zeertzjq
c11417b3d7 vim-patch:9.0.1507: assert message is confusing with boolean result
Problem:    Assert message is confusing with boolean result.  assert_inrange()
            replaces message instead of adding it.
Solution:   Don't put quotes around expected boolean value.  Append message
            for assert_inrange(). (closes vim/vim#12342, closes vim/vim#12341)

53f5e51628

Move assert_type_T to testing.c and remove ASSERT_INRANGE.
2023-05-05 19:43:16 +08:00
zeertzjq
49c3eb01ab vim-patch:9.0.0854: no proper test for what 9.0.0846 fixes
Problem:    No proper test for what 9.0.0846 fixes.
Solution:   Run test in a terminal so that the hit-enter prompt can show up.
            (closes vim/vim#11523)

7265851b2b
2023-05-05 19:43:13 +08:00
zeertzjq
49a2bb9117 vim-patch:9.0.0846: using assert_fails() may cause hit-enter prompt
Problem:    Using assert_fails() may cause hit-enter prompt.
Solution:   Set no_wait_return. (closes vim/vim#11522)

f220643c26

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjq
050b24cbcc vim-patch:9.0.0543: insufficient testing for assert and test functions
Problem:    Insufficient testing for assert and test functions.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#11190)

e24b5e0b0f

Cherry-pick E1219 from patch 8.2.3229.
Cherry-pick test_assert.vim change from patch 9.0.0491.
Cherry-pick the whole Test_refcount() function and skip it.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-05 19:43:13 +08:00
zeertzjq
5fb6b3431a vim-patch:9.0.0404: crash when passing invalid arguments to assert_fails()
Problem:    Crash when passing invalid arguments to assert_fails().
Solution:   Check for NULL string.

1540d334a0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjq
17c8e39f88 vim-patch:9.0.0213: using freed memory with error in assert argument
Problem:    Using freed memory with error in assert argument.
Solution:   Make a copy of the error.

249e1b903a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00