aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNaveen Kumar Molleti <nerd.naveen@gmail.com>2014-09-27 01:18:33 +0530
committerJustin M. Keyes <justinkz@gmail.com>2014-10-16 03:49:05 +0000
commit3195aadf276edc1955163879b71b1ad01ed9e77e (patch)
treec7ae55acb59b8cbb563ebf0de09863a2305decc9 /src
parent97d2fbde7366073035ff11f93c6bc7c1879e5713 (diff)
downloadrneovim-3195aadf276edc1955163879b71b1ad01ed9e77e.tar.gz
rneovim-3195aadf276edc1955163879b71b1ad01ed9e77e.tar.bz2
rneovim-3195aadf276edc1955163879b71b1ad01ed9e77e.zip
vim-patch:7.4.436 #1246
Problem: ml_get error for autocommand that moves the cursor of the current window. Solution: Check the cursor position after switching back to the current buffer. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-436
Diffstat (limited to 'src')
-rw-r--r--src/nvim/fileio.c3
-rw-r--r--src/nvim/version.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index e9f1aad781..25bd9db055 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -6327,6 +6327,9 @@ win_found:
curwin = aco->save_curwin;
curbuf = curwin->w_buffer;
+ // In case the autocommand moves the cursor to a position that does not
+ // exist in curbuf
+ check_cursor();
}
}
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index b485d7fef7..5fa36b8d3d 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -196,7 +196,7 @@ static int included_patches[] = {
//439,
//438,
//437,
- //436,
+ 436,
//435,
//434,
//433,