From 3195aadf276edc1955163879b71b1ad01ed9e77e Mon Sep 17 00:00:00 2001 From: Naveen Kumar Molleti Date: Sat, 27 Sep 2014 01:18:33 +0530 Subject: 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 --- src/nvim/fileio.c | 3 +++ src/nvim/version.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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, -- cgit