summaryrefslogtreecommitdiff
path: root/src/move.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-10-18 14:50:18 +0200
committerBram Moolenaar <Bram@vim.org>2016-10-18 14:50:18 +0200
commit025e3e0bafbc85cc4e365145af711edf99d0a90d (patch)
tree0bbd3a565a44576e714d9f8c7c85fd5e6255ad9b /src/move.c
parent9ec7fa82a2c4f0283862ed704c2940959e6130ee (diff)
downloadvim-git-025e3e0bafbc85cc4e365145af711edf99d0a90d.tar.gz
patch 8.0.0044v8.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.
Diffstat (limited to 'src/move.c')
-rw-r--r--src/move.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/move.c b/src/move.c
index a4d5f8299..c7acdfa68 100644
--- a/src/move.c
+++ b/src/move.c
@@ -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;