]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1238: wrong cursor column with 'set splitkeep=screen' v9.1.1238
authorphanium <91544758+phanen@users.noreply.github.com>
Tue, 25 Mar 2025 19:15:31 +0000 (20:15 +0100)
committerChristian Brabandt <cb@256bit.org>
Tue, 25 Mar 2025 19:15:31 +0000 (20:15 +0100)
commit7746348c5d0f4c4707503f856d0335d8921e8d50
tree27779783db4cd86dbb43407acc3fa55e86ff6514
parent2726821d389e08f8bb5630de1ee2d39ce0f53197
patch 9.1.1238: wrong cursor column with 'set splitkeep=screen'

Problem:  With ':set splitkeep=screen', cursor did't restore column
          correctly when splitting a window on a line longer than the
          last line on the screen (after v9.1.0707)
Solution: Restore cursor column in `win_fix_scroll()` since it may be
          changed in `getvcol()` after 396fd1ec2956 (phanium).

Example:
```
echo longlonglongling\nshort | vim - -u NONE --cmd 'set
splitkeep=screen' +'norm $' +new +q
```

fixes: #16968
closes: #16971

Signed-off-by: phanium <91544758+phanen@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_window_cmd.vim
src/version.c
src/window.c