]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.2118: 'cursorline' missing after :diffput to empty buf v9.1.2118
authorzeertzjq <zeertzjq@outlook.com>
Fri, 30 Jan 2026 09:57:56 +0000 (09:57 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 30 Jan 2026 09:57:56 +0000 (09:57 +0000)
commitce1e562fdafa998e577d65a8b0a1b8bc1cbfcf4c
tree8f7a54248e0e03ae81f3b8384395f7f7942d4c3d
parentcfe9d83a8579698deb6abba2bcf31f717ae04577
patch 9.1.2118: 'cursorline' missing after :diffput to empty buf

Problem:  'cursorline' and part of 'statusline' are missing after
          :diffput to an empty buffer.
Solution: Make sure the cursor doesn't go beyond the last line after
          :diffput (zeertzjq)

related: neovim/neovim#37621
closes:  #19281

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/diff.c
src/testdir/dumps/Test_diffput_to_empty_buf_01.dump [new file with mode: 0644]
src/testdir/dumps/Test_diffput_to_empty_buf_02.dump [new file with mode: 0644]
src/testdir/dumps/Test_diffput_to_empty_buf_03.dump [new file with mode: 0644]
src/testdir/test_diffmode.vim
src/version.c