0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.1753

Problem:    "noinsert" in 'completeopt' is sometimes ignored.
Solution:   Set the variables when the 'completeopt' was set. (Ozaki Kiichi)
This commit is contained in:
Bram Moolenaar
2016-04-20 12:02:02 +02:00
parent 8d8aa0a367
commit c020042083
4 changed files with 20 additions and 7 deletions

View File

@@ -2760,6 +2760,21 @@ ins_compl_make_cyclic(void)
return count;
}
/*
* Set variables that store noselect and noinsert behavior from the
* 'completeopt' value.
*/
void
completeopt_was_set()
{
compl_no_insert = FALSE;
compl_no_select = FALSE;
if (strstr((char *)p_cot, "noselect") != NULL)
compl_no_select = TRUE;
if (strstr((char *)p_cot, "noinsert") != NULL)
compl_no_insert = TRUE;
}
/*
* Start completion for the complete() function.
* "startcol" is where the matched text starts (1 is first column).
@@ -3675,13 +3690,6 @@ ins_compl_prep(int c)
}
compl_no_insert = FALSE;
compl_no_select = FALSE;
if (strstr((char *)p_cot, "noselect") != NULL)
compl_no_select = TRUE;
if (strstr((char *)p_cot, "noinsert") != NULL)
compl_no_insert = TRUE;
if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET)
{
/*