Merge pull request #13692 from mjlbach/fix_cursor_respect_current_line

fix_cursor: do not change line number when edit will not impact cursor row
This commit is contained in:
Björn Linse
2021-02-16 18:32:38 +01:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -1930,7 +1930,6 @@ static void fix_cursor(linenr_T lo, linenr_T hi, linenr_T extra)
curwin->w_cursor.lnum += extra;
check_cursor_col();
} else if (extra < 0) {
curwin->w_cursor.lnum = lo;
check_cursor();
} else {
check_cursor_col();