aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
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/nvim/fileio.c
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/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c3
1 files changed, 3 insertions, 0 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();
}
}
}