Commit Graph

790 Commits

Author SHA1 Message Date
Luuk van Baal
a2f3855291 vim-patch:9.0.0893: 'smoothscroll' cursor calculations wrong when 'number' is set
Problem:    'smoothscroll' cursor calculations wrong when 'number' is set.
Solution:   Correct the code that computes the width. (closes vim/vim#11492)

01ee52bab6

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-05-02 13:11:47 +02:00
Luuk van Baal
88d13d2778 vim-patch:9.0.0807: with 'smoothscroll' typing "0" may not go to the first column
Problem:    With 'smoothscroll' typing "0" may not go to the first column.
Solution:   Recompute w_cline_height when needed.  Do not scroll up when it
            would move the cursor.

d5337efece

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
Luuk van Baal
72c525d567 vim-patch:9.0.0758: "precedes" from 'listchars' overwritten by <<<
Problem:    "precedes" from 'listchars' overwritten by <<< for 'smoothscroll'.
Solution:   Keep the "precedes" character.

13cdde3952

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
Luuk van Baal
6146400605 vim-patch:9.0.0757: line number not visisble with 'smoothscroll', 'nu' and 'rnu'
Problem:    Line number not visisble with 'smoothscroll', 'nu' and 'rnu'.
Solution:   Put the ">>>" after the line number instead of on top.

eb4de62931

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
Luuk van Baal
bf12a85a69 vim-patch:9.0.0734: cursor position invalid when scrolling with 'smoothscroll'
Problem:    Cursor position invalid when scrolling with 'smoothscroll' set.
            (Ernie Rael)
Solution:   Add w_valid_skipcol and clear flags when it changes.  Adjust
            w_skipcol after moving the cursor.

2fbabd238a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
Luuk van Baal
36c98b47a3 vim-patch:9.0.0707: with 'smoothscroll' cursor position not adjusted in long line
Problem:    With 'smoothscroll' and 'scrolloff' non-zero the cursor position
            is not properly adjusted in a long line.
Solution:   Move the cursor further up or down in the line.

118c235112

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
Luuk van Baal
f3de7f4468 vim-patch:9.0.0701: with 'smoothscroll' cursor position not adjusted in long line
Problem:    With 'smoothscroll' the cursor position s not adjusted in a long
            line.
Solution:   Move the cursor further up or down in the line.

8cf3459878

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:46 +02:00
Luuk van Baal
d95697d6d4 vim-patch:9.0.0673: first line wong with 'smoothscroll' and 'scrolloff' zero
Problem:    First line not scrolled properly with 'smoothscroll' and
            'scrolloff' zero and using "k".
Solution:   Make sure the cursor position is visible.

46b54747c5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:46 +02:00
Luuk van Baal
3a1973debc vim-patch:9.0.0672: line partly shows with 'smoothscroll' and 'scrolloff' zero
Problem:    Cursor line only partly shows with 'smoothscroll' and 'scrolloff'
            zero.
Solution:   Do not use 'smoothscroll' when adjusting the bottom of the window.
            (closes vim/vim#11269)

9bab7a0243

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:46 +02:00
Luuk van Baal
8e4a4629ca vim-patch:9.0.0671: negative topline using CTRL-Y with 'smoothscroll' and 'diff'
Problem:    Negative topline using CTRL-Y with 'smoothscroll' and 'diff'.
            (Ernie Rael)
Solution:   Only use 'smoothscroll' when 'wrap' is set.

1a58e1d97c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:46 +02:00
Luuk van Baal
f3b44cf23d vim-patch:9.0.0652: 'smoothscroll' not tested with 'number' and "n" in 'cpo'
Problem:    'smoothscroll' not tested with 'number' and "n" in 'cpo'.
Solution:   Add tests, fix uncovered problem.

b6aab8f44b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:46 +02:00
Luuk van Baal
a43b28a34c vim-patch:9.0.0649: no indication the first line is broken for 'smoothscroll'
Problem:    No indication when the first line is broken for 'smoothscroll'.
Solution:   Show "<<<" in the first line.

406b5d89e1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:46 +02:00
Luuk van Baal
d6050e9bda vim-patch:9.0.0646: with 'smoothscroll' CTRL-E is wrong when 'foldmethod' set
Problem:    with 'smoothscroll' set CTRL-E does not work properly when
            'foldmethod' is set to "indent". (Yee Cheng Chin)
Solution:   Merge the code for scroling with folds and 'smoothscroll'.
            (closes vim/vim#11262)

6b2d4ff714

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:46 +02:00
Luuk van Baal
69af5e8782 vim-patch:9.0.0645: CTRL-Y does not stop at line 1
Problem:    CTRL-Y does not stop at line 1. (John Marriott)
Solution:   Stop at line 1 when 'smoothscroll' is not set. (closes vim/vim#11261)

8df9748edb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:46 +02:00
Luuk van Baal
be11f80d01 vim-patch:9.0.0640: cannot scroll by screen line if a line wraps
Problem:    Cannot scroll by screen line if a line wraps.
Solution:   Add the 'smoothscroll' option.  Only works for CTRL-E and CTRL-Y
            so far.

f6196f4244

vim-patch:9.0.0641: missing part of the new option code

Problem:    Missing part of the new option code.
Solution:   Add missing WV_SMS.

bbbda8fd81

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:26 +02:00
zeertzjq
1fc468aed2
vim-patch:9.0.1491: wrong scrolling with ls=0 and :botright split (#23333)
Problem:    Wrong scrolling with ls=0 and :botright split.
Solution:   Add statusline before calling frame_new_height(). (closes vim/vim#12299)

fbf2071ac9
2023-04-27 09:07:30 +08:00
zeertzjq
040d9da5c8
vim-patch:9.0.1476: lines put in non-current window are not displayed (#23265)
Problem:    Lines put in non-current window are not displayed. (Marius
            Gedminas)
Solution:   Don't increment the topline when inserting just above it.
            (closes vim/vim#12212)

e7f05a8780

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-23 00:30:52 +08:00
zeertzjq
14caad32b6 test: convert tests in test_conceal.vim to Lua 2023-04-19 16:23:08 +08:00
Sean Dewar
7095f8ff9d
vim-patch:9.0.1461: ruler not drawn correctly when using 'rulerformat'
Problem:    Ruler not drawn correctly when using 'rulerformat'.
Solution:   Adjust formatting depending on whether the ruler is drawn in the
            statusline or the command line. (Sean Dewar, closes vim/vim#12246)

fc8a601c32

This issue was made apparent after neovim/neovim@0f1e2b6, as `showmode()` calls
`win_redr_ruler()` with `curwin` now if it's floating, rather than the last
window if there's no statusline (which usually already shares its right side
with that of the editor).

Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-04-17 18:38:31 +01:00
zeertzjq
fd68cd1c0a
vim-patch:8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level (#23131)
Problem:    Vim9: exception in ISN_INSTR caught at wrong level.
Solution:   Set the starting trylevel in exec_instructions(). (closes vim/vim#8214)

ff65288aa8

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 18:27:33 +08:00
kylo252
aab95ec67e
test: avoid name collisions with Xtest directory (#23019) 2023-04-11 17:18:54 +08:00
zeertzjq
d52cc668c7
vim-patch:9.0.1443: ending Insert mode when accessing a hidden prompt buffer (#22984)
Problem:    Ending Insert mode when accessing a hidden prompt buffer.
Solution:   Don't stop Insert mode when it was active before. (closes vim/vim#12237)

05a627c3d4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-10 07:33:26 +08:00
dundargoc
743860de40
test: replace lfs with luv and vim.fs
test: replace lfs with luv

luv already pretty much does everything lfs does, so this duplication
of dependencies isn't needed.
2023-04-04 21:59:06 +02:00
zeertzjq
10baf89712
vim-patch:9.0.1439: start Insert mode when accessing a hidden prompt buffer (#22867)
Problem:    Start Insert mode when accessing a hidden prompt buffer.
Solution:   Call leaving_window() in aucmd_restbuf(). (Thorben Tröbst,
            closes vim/vim#12148, closes vim/vim#12147)

cde8de0345

Cherry-pick test_prompt_buffer.vim changes from patch 9.0.0631.

Co-authored-by: orbital <orbital@holgerines.de>
2023-04-03 08:36:14 +08:00
zeertzjq
269dd747b6
refactor(defaults)!: change default 'commentstring' value to empty (#22862) 2023-04-02 23:01:48 +08:00
zeertzjq
4eef5ac453
vim-patch:9.0.1428: cursor in wrong position when leaving insert mode (#22786)
Problem:    Cursor in wrong position when leaving insert mode.
Solution:   Update the w_valid flags.  Position the cursor also when not
            redrawing. (closes vim/vim#12137)

c174c2e58c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-26 09:24:04 +08:00
Evgeni Chasnovski
fe9cbcb3a5
feat(api): nvim_exec2(), deprecate nvim_exec() #19032
Problem:
The signature of nvim_exec() is not extensible per ":help api-contract".

Solution:
Introduce nvim_exec2() and deprecate nvim_exec().
2023-03-25 09:58:48 -07:00
dundargoc
af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00
zeertzjq
fec1181ecd
test(legacy/prompt_buffer_spec): align script with oldtest more (#22354) 2023-02-21 17:43:53 +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
05faa8f30a
test: make expect_unchanged() less confusing (#22255)
Problem:
The sleep before collecting the initial screen state is confusing and
may lead to unexpected success if it comes after a blocking RPC call.

Solution:
Remove that sleep and add an "intermediate" argument.
2023-02-15 07:26:55 +08:00
zeertzjq
5c4b503d3c
vim-patch:9.0.1279: display shows lines scrolled down erroneously (#22126)
Problem:    Display shows lines scrolled down erroneously. (Yishai Lerner)
Solution:   Do not change "wl_lnum" at index zero. (closes vim/vim#11938)

61fdbfa1e3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-05 09:37:12 +08:00
zeertzjq
0481f04ec9
test(syn_attr_spec): add more information (#21912)
This makes it clear on test failure what the attributes are.
2023-01-20 10:03:29 +08:00
zeertzjq
f8669e8a18
vim-patch:8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 (#21883)
Problem:    Cannot lock a variable in legacy Vim script like in Vim9.
Solution:   Make ":lockvar 0" work.

a187c43cfe

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-01-19 08:03:13 +08:00
zeertzjq
61d5bd561a refactor: remove E5500, adjust tests
Now with try_end() including more exception info, E5500 looks like
redundant information.
Adjust tests for more exception information.
2023-01-16 18:03:08 +08:00
zeertzjq
d98e4e4b2e vim-patch:9.0.1195: restoring KeyTyped when building statusline not tested
Problem:    Restoring KeyTyped when building statusline not tested.
Solution:   Add a test.  Clean up and fix other tests. (closes vim/vim#11815)

378e6c03f9
2023-01-14 20:27:40 +08:00
dundargoc
936e191fef
docs: fix typos (#21427)
Co-authored-by: Gustavo Sampaio <gbritosampaio@gmail.com>
Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Tomas Nemec <nemi@skaut.cz>
2023-01-04 07:38:48 +08:00
Luuk van Baal
5b89d480e3 vim-patch:9.0.1061: cannot display 'showcmd' somewhere else
Problem:    Cannot display 'showcmd' somewhere else.
Solution:   Add the 'showcmdloc' option. (Luuk van Baal, closes vim/vim#11684)

ba936f6f4e

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2022-12-26 13:15:07 +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
65e8ed45de
vim-patch:9.0.0969: matchparen highlight is not updated when switching buffers (#21227)
Problem:    Matchparen highlight is not updated when switching buffers.
Solution:   Listen to the BufLeave and the BufWinEnter autocmd events.
            (closes vim/vim#11626)

28a896f54d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-29 10:17:57 +08:00
Luuk van Baal
bf0665b3f3 vim-patch:9.0.0964: status line not redrawn when 'splitkeep' is "screen"
Problem:    Status line of other window not redrawn when dragging it when
            'splitkeep' is set to "screen".
Solution:   Set w_redr_status earlier. (Luuk van Baal, closes vim/vim#11635,
            closes vim/vim#11632)

74a694dbe2

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2022-11-28 23:20:19 +01:00
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
zeertzjq
45e2bbae83 vim-patch:9.0.0051: using CTRL-C wih :append may hang Vim
Problem:    Using CTRL-C wih :append may hang Vim.
Solution:   Reset got_int. (closes vim/vim#10729, closes vim/vim#10728)
f754fe6a3d
2022-07-27 06:19:43 +08:00
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