]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0200: `gj`/`gk` not skipping over outer virtual text lines v9.1.0200
authorDylan Thacker-Smith <dylan.ah.smith@gmail.com>
Sun, 24 Mar 2024 08:43:25 +0000 (09:43 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 24 Mar 2024 08:43:25 +0000 (09:43 +0100)
commitb2d124c6258ff41e1f951bf39a4afc386d79ddc4
tree553f0db370d31fbdb8752e25aba51cb6cf70586b
parentd3c0ff5d5a9076999a8504ee4d23a2c5abaf494e
patch 9.1.0200: `gj`/`gk` not skipping over outer virtual text lines

Problem:  `gj`/`gk` was updating the desired cursor virtual column to
          the outer virtual text, even though the actual cursor position
          was moved to not be on the virtual text, leading the need to
          do an extra `gj`/`gk` to move past each virtual text line.
          (rickhowe)
Solution: Exclude the outer virtual text when getting the line length
          for moving the cursor with `gj`/`gk`, so that no extra
          movement is needed to skip over virtual text lines.
          (Dylan Thacker-Smith)

fixes: #12028
related: #14262

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/charset.c
src/normal.c
src/proto/charset.pro
src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_1.dump [new file with mode: 0644]
src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_2.dump [new file with mode: 0644]
src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_3.dump [new file with mode: 0644]
src/testdir/test_textprop.vim
src/version.c