0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.0044

Problem:    In diff mode the cursor may end up below the last line, resulting
            in an ml_get error.
Solution:   Check the line to be valid.
This commit is contained in:
Bram Moolenaar
2016-10-18 14:50:18 +02:00
parent 9ec7fa82a2
commit 025e3e0baf
5 changed files with 54 additions and 36 deletions

View File

@@ -2824,11 +2824,8 @@ do_check_cursorbind(void)
{
# ifdef FEAT_DIFF
if (curwin->w_p_diff)
curwin->w_cursor.lnum
= diff_get_corresponding_line(old_curbuf,
line,
curbuf,
curwin->w_cursor.lnum);
curwin->w_cursor.lnum =
diff_get_corresponding_line(old_curbuf, line);
else
# endif
curwin->w_cursor.lnum = line;