0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.1.0458: ml_get error and crash when using "do"

Problem:    Ml_get error and crash when using "do".
Solution:   Adjust cursor position also when diffupdate is not needed.
            (Hirohito Higashi)
This commit is contained in:
Bram Moolenaar
2018-10-07 17:46:42 +02:00
parent 0cc7b2d6cc
commit df77cef92e
3 changed files with 34 additions and 9 deletions

View File

@@ -277,6 +277,28 @@ func Test_dp_do_buffer()
%bwipe!
endfunc
func Test_do_lastline()
e! one
call setline(1, ['1','2','3','4','5','6'])
diffthis
new two
call setline(1, ['2','4','5'])
diffthis
1
norm dp]c
norm dp]c
wincmd w
call assert_equal(4, line('$'))
norm G
norm do
call assert_equal(3, line('$'))
windo diffoff
%bwipe!
endfunc
func Test_diffoff()
enew!
call setline(1, ['Two', 'Three'])