Commit Graph

767 Commits

Author SHA1 Message Date
Lewis Russell
1fe1bb084d refactor(options): deprecate nvim[_buf|_win]_[gs]et_option
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: famiu <famiuhaque@protonmail.com>
2023-05-21 15:14:01 +06: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
Luuk van Baal
02ef104d5b vim-patch:9.0.1564: display moves up and down with 'incsearch' and 'smoothscroll'
Problem:    Display moves up and down with 'incsearch' and 'smoothscroll'.
Solution:   Do not check if w_skipcol changed. (Luuk van Baal, closes vim/vim#12410,
            closes vim/vim#12409)

0222c2d103
2023-05-19 18:42:23 +02: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
luukvbaal
5825d2f6ca
test(scroll_opt): fix typo in porting oldtest (#23593) 2023-05-12 08:17:38 +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
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
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
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
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
bdaaf2e8e1 vim-patch:9.0.0250: slightly inconsistent error messages
Problem:    Slightly inconsistent error messages.
Solution:   Make it "Using a Float". (closes vim/vim#10959)

dde77a7c4d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 09:20:30 +08:00
zeertzjq
88cfb49bee vim-patch:8.2.4890: inconsistent capitalization in error messages
Problem:    Inconsistent capitalization in error messages.
Solution:   Make capitalization consistent. (Doug Kearns)

cf030578b2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 09:20:30 +08:00
zeertzjq
75119fcc86 vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile time
Problem:    Vim9: builtin function arguments not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539)

5b73992d8f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-05 09:19:05 +08:00
zeertzjq
1975062d3c
vim-patch:9.0.0662: concealed characters do not work correctly (#23454)
Problem:    Concealed characters do not work correctly.
Solution:   Subtract boguscols instead of adding them. (closes vim/vim#11273)

7500866182

Code change is N/A as Nvim has a draw_col variable instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-03 07:54:17 +08:00
zeertzjq
62ecb05957
vim-patch:9.0.1506: line number not displayed when using 'smoothscroll' (#23453)
Problem:    Line number not displayed when using 'smoothscroll'.
Solution:   Adjust condition for showing the line number. (closes vim/vim#12333)

88bb3e0a48
2023-05-03 07:21:09 +08:00
Luuk van Baal
3b906af27f test: 'smoothscroll' <<< marker shows with tabline, winbar and splits 2023-05-02 13:11:47 +02:00
Luuk van Baal
3b1d31197c vim-patch:9.0.1502: no test for deleting the end of a long wrapped line
Problem:    No test for deleting the end of a long wrapped line.
Solution:   Add a test to check the right text is displayed. (Luuk van Baal,
            closes vim/vim#12318)

5b10a14098

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2023-05-02 13:11:47 +02:00
Luuk van Baal
f78130b2d8 test: 'smoothscroll' works with virt_lines above and below 2023-05-02 13:11:47 +02:00
Luuk van Baal
4e4383ffa2 vim-patch:9.0.1247: divide by zero with 'smoothscroll' set and a narrow window
Problem:    Divide by zero with 'smoothscroll' set and a narrow window.
Solution:   Bail out when the window is too narrow.

870219c58c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
Luuk van Baal
9b9ccac625 vim-patch:9.0.1121: cursor positioning and display problems with 'smoothscroll'
Problem:    Cursor positioning and display problems with 'smoothscroll' and
            using "zt", "zb" or "zz".
Solution:   Adjust computations and conditions. (Yee Cheng Chin,
            closes vim/vim#11764)

db4d88c2ad

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
Luuk van Baal
6fd7e3bea4 vim-patch:9.0.1000: with 'smoothscroll' skipcol may be reset unnecessarily
Problem:    With 'smoothscroll' skipcol may be reset unnecessarily.
Solution:   Check the line does actually fit in the window.

b21b8e9ed0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
Luuk van Baal
46646a9bb8 vim-patch:9.0.0908: with 'smoothscroll' cursor may end up in wrong position
Problem:    With 'smoothscroll' cursor may end up in wrong position.
Solution:   Correct the computation of screen lines. (Yee Cheng Chin,
            closes vim/vim#11502)

361895d2a1

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-05-02 13:11:47 +02:00
Luuk van Baal
3621604029 vim-patch:9.0.0900: cursor moves too far with 'smoothscroll'
Problem:    Cursor moves too far with 'smoothscroll'.
Solution:   Only move as far as really needed. (Yee Cheng Chin, closes vim/vim#11504)

81ba26e9de

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-05-02 13:11:47 +02:00
Luuk van Baal
0bcf2a6382 vim-patch:9.0.0898: with 'smoothscroll' cursor is one screen line too far down
Problem:    With 'smoothscroll' cursor is one screen line too far down. (Ernie
            Rael)
Solution:   Add a test that currently has the wrong result so that a fix can
            be made. (issue vim/vim#11436)

75ac25b496

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02 13:11:47 +02:00
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