diff options
author | Naveen Kumar Molleti <nerd.naveen@gmail.com> | 2014-09-27 01:18:33 +0530 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-10-16 03:49:05 +0000 |
commit | 3195aadf276edc1955163879b71b1ad01ed9e77e (patch) | |
tree | c7ae55acb59b8cbb563ebf0de09863a2305decc9 | |
parent | 97d2fbde7366073035ff11f93c6bc7c1879e5713 (diff) | |
download | rneovim-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
-rw-r--r-- | src/nvim/fileio.c | 3 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
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, |