1
0
forked from aniani/vim

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

@@ -2848,18 +2848,19 @@ ex_diffgetput(exarg_T *eap)
theend:
diff_busy = FALSE;
if (diff_need_update)
{
diff_need_update = FALSE;
ex_diffupdate(NULL);
}
// Check that the cursor is on a valid character and update it's
// position. When there were filler lines the topline has become
// invalid.
check_cursor();
changed_line_abv_curs();
if (diff_need_update)
// redraw already done by ex_diffupdate()
diff_need_update = FALSE;
else
{
// Check that the cursor is on a valid character and update it's
// position. When there were filler lines the topline has become
// invalid.
check_cursor();
changed_line_abv_curs();
// Also need to redraw the other buffers.
diff_redraw(FALSE);
apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);