aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2015-04-28 12:02:48 +0300
committerJustin M. Keyes <justinkz@gmail.com>2015-04-28 20:55:45 -0400
commit13e148687c4eb60205c56b0ddaf19241daea7ca4 (patch)
treec7b115331942b7922c3cbfa9b7e6645a3255c654
parent158d26753371c9f9f14957b644c8f9bb9b938ef4 (diff)
downloadrneovim-13e148687c4eb60205c56b0ddaf19241daea7ca4.tar.gz
rneovim-13e148687c4eb60205c56b0ddaf19241daea7ca4.tar.bz2
rneovim-13e148687c4eb60205c56b0ddaf19241daea7ca4.zip
vim-patch:7.4.630 #2524
Problem: When using Insert mode completion combined with autocommands the redo command may not work. Solution: Do not save the redo buffer when executing autocommands. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/v7-4-630
-rw-r--r--src/nvim/fileio.c10
-rw-r--r--src/nvim/version.c2
2 files changed, 9 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 0dcf43c659..44bed92133 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -6466,6 +6466,7 @@ apply_autocmds_group (
long save_cmdbang;
static int filechangeshell_busy = FALSE;
proftime_T wait_time;
+ bool did_save_redobuff = false;
/*
* Quickly return if there are no autocommands for this event or
@@ -6641,7 +6642,10 @@ apply_autocmds_group (
*/
if (!autocmd_busy) {
save_search_patterns();
- saveRedobuff();
+ if (!ins_compl_active()) {
+ saveRedobuff();
+ did_save_redobuff = true;
+ }
did_filetype = keep_filetype;
}
@@ -6726,7 +6730,9 @@ apply_autocmds_group (
// free any windows in the au_pending_free_win list.
if (!autocmd_busy) {
restore_search_patterns();
- restoreRedobuff();
+ if (did_save_redobuff) {
+ restoreRedobuff();
+ }
did_filetype = FALSE;
while (au_pending_free_buf != NULL) {
buf_T *b = au_pending_free_buf->b_next;
diff --git a/src/nvim/version.c b/src/nvim/version.c
index a6a86f09d1..1d0804796e 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -149,7 +149,7 @@ static int included_patches[] = {
//633,
//632,
//631,
- //630,
+ 630,
//629,
//628,
//627,