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)

df77cef92e
This commit is contained in:
Anatolii Sakhnik
2018-12-09 19:55:08 +02:00
parent fe0114ec41
commit e104228b1c
2 changed files with 33 additions and 7 deletions

View File

@@ -2739,15 +2739,19 @@ void ex_diffgetput(exarg_T *eap)
theend:
diff_busy = false;
if (diff_need_update) {
diff_need_update = false;
ex_diffupdate(NULL);
} 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();
}
// 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 {
// Also need to redraw the other buffers.
diff_redraw(false);
apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, false, curbuf);