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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user