aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-06-24 02:35:25 +0200
committerGitHub <noreply@github.com>2019-06-24 02:35:25 +0200
commit7d604a1e6158cda79f7ac485e0ef0e349014f8bf (patch)
tree4234b4bc08bfa6023b91f385642d899266bc825a /src/nvim/edit.c
parent9fd4a0b52697db053143f51822e68da95c6886aa (diff)
parentfa3db26f100bcb1c27b62b491bd63aed0800795b (diff)
downloadrneovim-7d604a1e6158cda79f7ac485e0ef0e349014f8bf.tar.gz
rneovim-7d604a1e6158cda79f7ac485e0ef0e349014f8bf.tar.bz2
rneovim-7d604a1e6158cda79f7ac485e0ef0e349014f8bf.zip
Merge #10294 from janlazo/vim-8.0.1239
vim-patch:8.0.1239,8.1.{112,125,165,166,167,169,181,242,270,272,747,850,853,1519}
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 9af003f140..8040109685 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -3838,11 +3838,14 @@ static int ins_compl_get_exp(pos_T *ini)
e_cpt = (compl_cont_status & CONT_LOCAL)
? (char_u *)"." : curbuf->b_p_cpt;
last_match_pos = first_match_pos = *ini;
+ } else if (ins_buf != curbuf && !buf_valid(ins_buf)) {
+ ins_buf = curbuf; // In case the buffer was wiped out.
}
compl_old_match = compl_curr_match; // remember the last current match
pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos;
- /* For ^N/^P loop over all the flags/windows/buffers in 'complete' */
+
+ // For ^N/^P loop over all the flags/windows/buffers in 'complete'
for (;; ) {
found_new_match = FAIL;
set_match_pos = FALSE;