aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/scroll_opt_spec.lua
Commit message (Collapse)AuthorAge
* fix(tests): needing two calls to setup a screen is cringebfredl2024-11-14
| | | | | | | | | | 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.
* vim-patch:9.1.0753: Wrong display when typing in diff mode with ↵zeertzjq2024-10-01
| | | | | | | | | | '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
* vim-patch:9.1.0708: Recursive window update does not account for reset ↵luukvbaal2024-09-01
| | | | | | | | | | 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
* vim-patch:9.1.0414: Unable to leave long line with 'smoothscroll' and ↵Luuk van Baal2024-05-17
| | | | | | | | | | | | | | | | | | | | | '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
* vim-patch:9.1.0397: Wrong display with 'smoothscroll' when changing quickfix ↵zeertzjq2024-05-09
| | | | | | | | | | 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
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | 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.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* vim-patch:9.1.0211: page-wise scrolling does not support smooth-scrollingLuuk van Baal2024-03-28
| | | | | | | | | | | 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
* refactor(tests): use global defaults instead of set_default_attr_ids (2)bfredl2024-03-27
|
* refactor(tests): all screen tests should use highlightsbfredl2024-03-23
| | | | | | | | | | | | | | | | | | | | | | | 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)
* refactor: format test/*Justin M. Keyes2024-01-03
|
* test: avoid repeated screen lines in expected stateszeertzjq2023-12-09
| | | | | | 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
* vim-patch:9.0.2145: wrong scrolling in insert mode with smoothscroll (#26375)zeertzjq2023-12-04
| | | | | | | | | | 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
* vim-patch:9.0.2107: [security]: FPE in adjust_plines_for_skipcol (#26082)zeertzjq2023-11-17
| | | | | | | | | | | | | 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>
* vim-patch:9.0.2105: skipcol not reset when topline changed (#26042)luukvbaal2023-11-15
| | | | | | | | 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
* docs: small fixes (#25585)dundargoc2023-10-29
| | | | Co-authored-by: tmummert <doczook@gmx.de> Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
* fix(plines): don't return very large height on very long line (#24260)zeertzjq2023-07-05
|
* vim-patch:9.0.1667: regression test doesn't fail when fix is revertedzeertzjq2023-06-27
| | | | | | | | 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
* vim-patch:9.0.1664: divide by zero when scrolling with 'smoothscroll' setzeertzjq2023-06-27
| | | | | | | | | 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>
* vim-patch:9.0.1612: "skipcol" not reset when using multi-byte characters ↵zeertzjq2023-06-06
| | | | | | | | | | (#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>
* vim-patch:9.0.1610: display is wrong when 'smoothscroll' is setzeertzjq2023-06-06
| | | | | | | | | 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
* vim-patch:9.0.1603: display wrong if scrolling multiple lines with ↵zeertzjq2023-06-06
| | | | | | | | | | '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
* vim-patch:9.0.1602: stray character visible if marker on top of double-wide ↵zeertzjq2023-06-04
| | | | | | | | | | 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
* vim-patch:9.0.1568: with 'smoothscroll' cursor may move below botlineLuuk van Baal2023-05-19
| | | | | | | | 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
* vim-patch:9.0.1564: display moves up and down with 'incsearch' and ↵Luuk van Baal2023-05-19
| | | | | | | | | | '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
* vim-patch:9.0.1543: display errors when making topline shorterLuuk van Baal2023-05-11
| | | | | | | | | 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
* vim-patch:9.0.1533: test for 'smoothscroll' is ineffectiveLuuk van Baal2023-05-09
| | | | | | | | 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
* vim-patch:9.0.1525: 'smoothscroll' does not always work properly (#23544)luukvbaal2023-05-09
| | | | | | | 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
* vim-patch:9.0.1512: inserting lines when scrolling with 'smoothscroll' setLuuk van Baal2023-05-07
| | | | | | | | 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
* vim-patch:9.0.1506: line number not displayed when using 'smoothscroll' (#23453)zeertzjq2023-05-03
| | | | | | 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
* test: 'smoothscroll' <<< marker shows with tabline, winbar and splitsLuuk van Baal2023-05-02
|
* test: 'smoothscroll' works with virt_lines above and belowLuuk van Baal2023-05-02
|
* vim-patch:9.0.1247: divide by zero with 'smoothscroll' set and a narrow windowLuuk van Baal2023-05-02
| | | | | | | | | 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>
* vim-patch:9.0.1121: cursor positioning and display problems with 'smoothscroll'Luuk van Baal2023-05-02
| | | | | | | | | | | 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>
* vim-patch:9.0.1000: with 'smoothscroll' skipcol may be reset unnecessarilyLuuk van Baal2023-05-02
| | | | | | | | | 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>
* vim-patch:9.0.0908: with 'smoothscroll' cursor may end up in wrong positionLuuk van Baal2023-05-02
| | | | | | | | | | 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>
* vim-patch:9.0.0900: cursor moves too far with 'smoothscroll'Luuk van Baal2023-05-02
| | | | | | | | | 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>
* vim-patch:9.0.0898: with 'smoothscroll' cursor is one screen line too far downLuuk van Baal2023-05-02
| | | | | | | | | | | 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>
* vim-patch:9.0.0893: 'smoothscroll' cursor calculations wrong when 'number' ↵Luuk van Baal2023-05-02
| | | | | | | | | | | 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>
* vim-patch:9.0.0807: with 'smoothscroll' typing "0" may not go to the first ↵Luuk van Baal2023-05-02
| | | | | | | | | | | | 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>
* vim-patch:9.0.0758: "precedes" from 'listchars' overwritten by <<<Luuk van Baal2023-05-02
| | | | | | | | | 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>
* vim-patch:9.0.0757: line number not visisble with 'smoothscroll', 'nu' and 'rnu'Luuk van Baal2023-05-02
| | | | | | | | | 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>
* vim-patch:9.0.0734: cursor position invalid when scrolling with 'smoothscroll'Luuk van Baal2023-05-02
| | | | | | | | | | | 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>
* vim-patch:9.0.0707: with 'smoothscroll' cursor position not adjusted in long ↵Luuk van Baal2023-05-02
| | | | | | | | | | | | 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>
* vim-patch:9.0.0701: with 'smoothscroll' cursor position not adjusted in long ↵Luuk van Baal2023-05-02
| | | | | | | | | | | | 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. https://github.com/vim/vim/commit/8cf3459878198c5bb4a96f3c63214b2beccce341 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0673: first line wong with 'smoothscroll' and 'scrolloff' zeroLuuk van Baal2023-05-02
| | | | | | | | | | Problem: First line not scrolled properly with 'smoothscroll' and 'scrolloff' zero and using "k". Solution: Make sure the cursor position is visible. https://github.com/vim/vim/commit/46b54747c5d252c584571a321231bad9330018ec Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0672: line partly shows with 'smoothscroll' and 'scrolloff' zeroLuuk van Baal2023-05-02
| | | | | | | | | | | 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) https://github.com/vim/vim/commit/9bab7a024393200bb2c03b3abddfda86436990a7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0671: negative topline using CTRL-Y with 'smoothscroll' and 'diff'Luuk van Baal2023-05-02
| | | | | | | | | | Problem: Negative topline using CTRL-Y with 'smoothscroll' and 'diff'. (Ernie Rael) Solution: Only use 'smoothscroll' when 'wrap' is set. https://github.com/vim/vim/commit/1a58e1d97cfc72e501cbf63ad75f46f1bb4c8da2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0652: 'smoothscroll' not tested with 'number' and "n" in 'cpo'Luuk van Baal2023-05-02
| | | | | | | | | Problem: 'smoothscroll' not tested with 'number' and "n" in 'cpo'. Solution: Add tests, fix uncovered problem. https://github.com/vim/vim/commit/b6aab8f44beb8c5d99393abdc2c9faab085c72aa Co-authored-by: Bram Moolenaar <Bram@vim.org>