summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/legacy/scroll_opt_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-22vim-patch:9.2.0356: Cannot apply 'scrolloff' context lines at end of filezeertzjq1
Problem: Cannot apply 'scrolloff' context lines at end of file Solution: Add the 'scrolloffpad' option to keep 'scrolloff' context even when at the end of the file (McAuley Penney). closes: vim/vim#19040 https://github.com/vim/vim/commit/a414630393f81c9a5b8fa4d0fcc1287155f67751 Co-authored-by: McAuley Penney <jacobmpenney@gmail.com>
2026-04-20fix(smoothscroll): crash when resizing to textoff with showbreakJaehwang Jung1
vim-patch:9.2.0362: division by zero with smoothscroll and small windows Problem: Resizing a smoothscrolled wrapped window to its textoff width with 'showbreak' can leave wrapped continuation lines with zero text width. win_lbr_chartabsize() still runs the partial max_head_vcol calculation in that state and divides by width2, crashing during redraw. Solution: Skip that partial head calculation when the wrapped continuation width is zero, matching the other width2 guards in charset.c (Jaehwang Jung) closes: vim/vim#20012 AI-assisted: Codex https://github.com/vim/vim/commit/0e31fb024c846e36bb0d26d01ff179a0d1b3eae4
2025-04-21feat(options): default statusline expression #33036Shadman1
Problem: Default 'statusline' is implemented in C and not representable as a statusline expression. This makes it hard for user configs/plugins to extend it. Solution: - Change the default 'statusline' slightly to a statusline expression. - Remove the C implementation.
2025-03-04refactor(tests): use new-style highlight spec in legacy/bfredl1
2025-02-06feat(defaults): enable diffopt "linematch" #32346Siddhant Agarwal1
2024-11-14fix(tests): needing two calls to setup a screen is cringebfredl1
Before calling "attach" a screen object is just a dummy container for (row, col) values whose purpose is to be sent as part of the "attach" function call anyway. Just create the screen in an attached state directly. Keep the complete (row, col, options) config together. It is still completely valid to later detach and re-attach as needed, including to another session.
2024-10-01vim-patch:9.1.0753: Wrong display when typing in diff mode with ↵zeertzjq1
'smoothscroll' (#30614) Problem: Wrong display when typing in diff mode with 'smoothscroll'. Solution: Use adjust_plines_for_skipcol() (zeertzjq). closes: vim/vim#15776 https://github.com/vim/vim/commit/47f8584a80006cd25e7dc6fa7fb1bfe2e768403c
2024-09-01vim-patch:9.1.0708: Recursive window update does not account for reset ↵luukvbaal1
skipcol (#30217) Problem: Window is updated with potentially invalid skipcol in recursive window update path. I.e. cursor outside of visible range in large line that does not fit. Solution: Make sure it is valid (Luuk van Baal). https://github.com/vim/vim/commit/3d5065fc7553c8de3d0555c3085165bdd724663b
2024-05-17vim-patch:9.1.0414: Unable to leave long line with 'smoothscroll' and ↵Luuk van Baal1
'scrolloff' Problem: Unable to leave long line with 'smoothscroll' and 'scrolloff'. Corrupted screen near the end of a long line with 'scrolloff'. (Ernie Rael, after 9.1.0280) Solution: Only correct cursor in case scroll_cursor_bot() was not itself called to make the cursor visible. Avoid adjusting for 'scrolloff' beyond the text line height (Luuk van Baal) https://github.com/vim/vim/commit/b32055e504ebd4f6183a93b92b08d61dad61c841 vim-patch:9.1.0416: some screen dump tests can be improved Problem: some screen dump tests can be improved (after 9.1.0414) Solution: Make sure screen state changes properly and is captured in the screen dumps (Luuk van Baal) https://github.com/vim/vim/commit/2e642734f4be506483315b8881748a7ef45854f4
2024-05-09vim-patch:9.1.0397: Wrong display with 'smoothscroll' when changing quickfix ↵zeertzjq1
list (#28674) Problem: Wrong display with 'smoothscroll' when changing quickfix list. Solution: Reset w_skipcol when replacing quickfix list (zeertzjq). closes: vim/vim#14730 https://github.com/vim/vim/commit/c7a8eb5ff2ddd919e6f39faec93d81c52874695a
2024-04-23test: improve test conventionsdundargoc1
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
2024-04-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-03-28vim-patch:9.1.0211: page-wise scrolling does not support smooth-scrollingLuuk van Baal1
Problem: Page-wise scrolling with Ctrl-F/Ctrl-B implements it's own logic to change the topline and cursor. In doing so, skipcol is not handled properly for 'smoothscroll', and virtual lines. Solution: Re-use the logic from Ctrl-E/Ctrl-Y while staying backward compatible as much as possible. https://github.com/vim/vim/commit/b9f5b95b7bec2414a5a96010514702d99afea18e
2024-03-27refactor(tests): use global defaults instead of set_default_attr_ids (2)bfredl1
2024-03-23refactor(tests): all screen tests should use highlightsbfredl1
This is the first installment of a multi-PR series significantly refactoring how highlights are being specified. The end goal is to have a base set of 20 ish most common highlights, and then specific files only need to add more groups to that as needed. As a complicating factor, we also want to migrate to the new default color scheme eventually. But by sharing a base set, that future PR will hopefully be a lot smaller since a lot of tests will be migrated just simply by updating the base set in place. As a first step, fix the anti-pattern than Screen defaults to ignoring highlights. Highlights are integral part of the screen state, not something "extra" which we only test "sometimes". For now, we still allow opt-out via the intentionally ugly screen._default_attr_ids = nil The end goal is to get rid of all of these eventually (which will be easier as part of the color scheme migration)
2024-01-03refactor: format test/*Justin M. Keyes1
2023-12-09test: avoid repeated screen lines in expected stateszeertzjq1
This is the command invoked repeatedly to make the changes: :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
2023-12-04vim-patch:9.0.2145: wrong scrolling in insert mode with smoothscroll (#26375)zeertzjq1
Problem: Wrong scrolling in Insert mode with 'smoothscroll' at the bottom of the window. Solution: Don't use set_topline() when 'smoothscroll' is set. fixes: vim/vim#13612 closes: vim/vim#13613 https://github.com/vim/vim/commit/5b4d1fcbf06757bae32a894871b9a649c84eba7f
2023-11-17vim-patch:9.0.2107: [security]: FPE in adjust_plines_for_skipcol (#26082)zeertzjq1
Problem: [security]: FPE in adjust_plines_for_skipcol Solution: don't divide by zero, return zero Prevent a floating point exception when calculating w_skipcol (which can happen with a small window when the number option is set and cpo+=n). Add a test to verify https://github.com/vim/vim/commit/cb0b99f0672d8446585d26e998343dceca17d1ce Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-15vim-patch:9.0.2105: skipcol not reset when topline changed (#26042)luukvbaal1
Problem: Skipcol is not reset when topline changed scrolling cursor to top Solution: reset skipcol closes: vim/vim#13528 https://github.com/vim/vim/commit/bb800a7907209f7d349f87b76b3b9ca30b416298
2023-10-29docs: small fixes (#25585)dundargoc1
Co-authored-by: tmummert <doczook@gmx.de> Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
2023-07-05fix(plines): don't return very large height on very long line (#24260)zeertzjq1
2023-06-27vim-patch:9.0.1667: regression test doesn't fail when fix is revertedzeertzjq1
Problem: Regression test doesn't fail when fix is reverted. Solution: Add "n" to 'cpoptions' instead of using :winsize. (closes vim/vim#12587, issue vim/vim#12528) https://github.com/vim/vim/commit/e42989374144a63d986b878618aeac328e35ac3b
2023-06-27vim-patch:9.0.1664: divide by zero when scrolling with 'smoothscroll' setzeertzjq1
Problem: Divide by zero when scrolling with 'smoothscroll' set. Solution: Avoid using a negative width. (closes vim/vim#12540, closes vim/vim#12528) https://github.com/vim/vim/commit/8154e642aa476e1a5d3de66c34e8289845b2b797 Co-authored-by: fullwaywang <fullwaywang@tencent.com>
2023-06-06vim-patch:9.0.1612: "skipcol" not reset when using multi-byte characters ↵zeertzjq1
(#23928) Problem: "skipcol" not reset when using multi-byte characters. Solution: Compare with w_virtcol instead of w_cursor.col. (closes vim/vim#12457) https://github.com/vim/vim/commit/15d4747ffd197ffa5b5a41a852a1fe93b6cc35fd Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-06-06vim-patch:9.0.1610: display is wrong when 'smoothscroll' is setzeertzjq1
Problem: Display is wrong when 'smoothscroll' is set and scrolling multiple lines. Solution: Redraw with UPD_NOT_VALID when "skipcol" is or was set. (closes vim/vim#12490, closes vim/vim#12468) https://github.com/vim/vim/commit/d9a92dc70b20c76cef9ca186676583c92c14311c
2023-06-06vim-patch:9.0.1603: display wrong if scrolling multiple lines with ↵zeertzjq1
'smoothscroll' Problem: Display wrong when scrolling multiple lines with 'smoothscroll' set. Solution: Redraw when w_skipcol changed. (closes vim/vim#12477, closes vim/vim#12468) https://github.com/vim/vim/commit/3c802277604a6b21110e41bedfe4c937ba7c2b7d
2023-06-04vim-patch:9.0.1602: stray character visible if marker on top of double-wide ↵zeertzjq1
char (#23897) Problem: Stray character is visible if 'smoothscroll' marker is displayed on top of a double-wide character. Solution: When overwriting a double-width character with the 'smoothscroll' marker clear the second half. (closes vim/vim#12469) https://github.com/vim/vim/commit/ecb87dd7d3f7b9291092a7dd8fae1e59b9903252
2023-05-19vim-patch:9.0.1568: with 'smoothscroll' cursor may move below botlineLuuk van Baal1
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) https://github.com/vim/vim/commit/d49f646bf56b29d44bbb16e79bc877b59aab38ac
2023-05-19vim-patch:9.0.1564: display moves up and down with 'incsearch' and ↵Luuk van Baal1
'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) https://github.com/vim/vim/commit/0222c2d103ad9298bec4dc8864cd80b4e7559db1
2023-05-11vim-patch:9.0.1543: display errors when making topline shorterLuuk van Baal1
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) https://github.com/vim/vim/commit/5d01f86d99bc3a3fd92d4f4e9338a9e78e9ebe16
2023-05-09vim-patch:9.0.1533: test for 'smoothscroll' is ineffectiveLuuk van Baal1
Problem: Test for 'smoothscroll' is ineffective. Solution: Change the order of testing "zb" and "zt". (Luuk van Baal, closes vim/vim#12366) https://github.com/vim/vim/commit/6f37e530d3e2d58ff055723047bf91d91af2632c
2023-05-09vim-patch:9.0.1525: 'smoothscroll' does not always work properly (#23544)luukvbaal1
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) https://github.com/vim/vim/commit/3ce8c389155fc1257082cdb0cef7801b49f6aaf9
2023-05-07vim-patch:9.0.1512: inserting lines when scrolling with 'smoothscroll' setLuuk van Baal1
Problem: Inserting lines when scrolling with 'smoothscroll' set. Solution: Adjust line height computation for w_skipcol. (Luuk van Baal, closes vim/vim#12350) https://github.com/vim/vim/commit/c8502f9b880b6d23baa4f9d28b60e1ceb442e35f
2023-05-03vim-patch:9.0.1506: line number not displayed when using 'smoothscroll' (#23453)zeertzjq1
Problem: Line number not displayed when using 'smoothscroll'. Solution: Adjust condition for showing the line number. (closes vim/vim#12333) https://github.com/vim/vim/commit/88bb3e0a48f160134bdea98cd2b8bd3af86f9d6f
2023-05-02test: 'smoothscroll' <<< marker shows with tabline, winbar and splitsLuuk van Baal1
2023-05-02test: 'smoothscroll' works with virt_lines above and belowLuuk van Baal1
2023-05-02vim-patch:9.0.1247: divide by zero with 'smoothscroll' set and a narrow windowLuuk van Baal1
Problem: Divide by zero with 'smoothscroll' set and a narrow window. Solution: Bail out when the window is too narrow. https://github.com/vim/vim/commit/870219c58c0804bdc55419b2e455c06ac715a835 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02vim-patch:9.0.1121: cursor positioning and display problems with 'smoothscroll'Luuk van Baal1
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) https://github.com/vim/vim/commit/db4d88c2adfe8f8122341ac9d6cae27ef78451c8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02vim-patch:9.0.1000: with 'smoothscroll' skipcol may be reset unnecessarilyLuuk van Baal1
Problem: With 'smoothscroll' skipcol may be reset unnecessarily. Solution: Check the line does actually fit in the window. https://github.com/vim/vim/commit/b21b8e9ed081a6ef6b6745fe65d219b3ac046c3b Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02vim-patch:9.0.0908: with 'smoothscroll' cursor may end up in wrong positionLuuk van Baal1
Problem: With 'smoothscroll' cursor may end up in wrong position. Solution: Correct the computation of screen lines. (Yee Cheng Chin, closes vim/vim#11502) https://github.com/vim/vim/commit/361895d2a15b4b0bbbb4c009261eab5b3d69ebf1 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-05-02vim-patch:9.0.0900: cursor moves too far with 'smoothscroll'Luuk van Baal1
Problem: Cursor moves too far with 'smoothscroll'. Solution: Only move as far as really needed. (Yee Cheng Chin, closes vim/vim#11504) https://github.com/vim/vim/commit/81ba26e9de24ca6b1c05b6ec03e53b21793f1a4b Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-05-02vim-patch:9.0.0898: with 'smoothscroll' cursor is one screen line too far downLuuk van Baal1
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) https://github.com/vim/vim/commit/75ac25b4967cdcdfdf2d6c086a6e2308868c280a Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02vim-patch:9.0.0893: 'smoothscroll' cursor calculations wrong when 'number' ↵Luuk van Baal1
is set Problem: 'smoothscroll' cursor calculations wrong when 'number' is set. Solution: Correct the code that computes the width. (closes vim/vim#11492) https://github.com/vim/vim/commit/01ee52bab6041450095c53f9469b1b266a7e3d4d Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-05-02vim-patch:9.0.0807: with 'smoothscroll' typing "0" may not go to the first ↵Luuk van Baal1
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. https://github.com/vim/vim/commit/d5337efece7c68e9b4ce864532ea49b02453b674 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02vim-patch:9.0.0758: "precedes" from 'listchars' overwritten by <<<Luuk van Baal1
Problem: "precedes" from 'listchars' overwritten by <<< for 'smoothscroll'. Solution: Keep the "precedes" character. https://github.com/vim/vim/commit/13cdde39520220bb856cba16626327c706752b51 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02vim-patch:9.0.0757: line number not visisble with 'smoothscroll', 'nu' and 'rnu'Luuk van Baal1
Problem: Line number not visisble with 'smoothscroll', 'nu' and 'rnu'. Solution: Put the ">>>" after the line number instead of on top. https://github.com/vim/vim/commit/eb4de629315f2682d8b314462d02422ec98d751a Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02vim-patch:9.0.0734: cursor position invalid when scrolling with 'smoothscroll'Luuk van Baal1
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. https://github.com/vim/vim/commit/2fbabd238a94022c99506e920186a5b6cdf15426 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-02vim-patch:9.0.0707: with 'smoothscroll' cursor position not adjusted in long ↵Luuk van Baal1
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. https://github.com/vim/vim/commit/118c235112854f34182d968613d7fe98be3b290b Co-authored-by: Bram Moolenaar <Bram@vim.org>