summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/edit.c b/src/edit.c
index f4a835485..080e1ab31 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -2761,6 +2761,21 @@ ins_compl_make_cyclic(void)
}
/*
+ * 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).
* "list" is the list of matches.
@@ -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)
{
/*