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:
22
src/edit.c
22
src/edit.c
@@ -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)
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user