summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/edit.c b/src/edit.c
index 9224c58970..cb78cd62d9 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -114,7 +114,6 @@ static int compl_pending = FALSE;
static pos_T compl_startpos;
static colnr_T compl_col = 0; /* column where the text starts
* that is being completed */
-static int save_sm = -1;
static char_u *compl_orig_text = NULL; /* text as it was before
* completion started */
static int compl_cont_mode = 0;
@@ -2733,11 +2732,19 @@ ins_compl_clear()
compl_pattern = NULL;
vim_free(compl_leader);
compl_leader = NULL;
- save_sm = -1;
edit_submode_extra = NULL;
}
/*
+ * Return TRUE when Insert completion is active.
+ */
+ int
+ins_compl_active()
+{
+ return compl_started;
+}
+
+/*
* Delete one character before the cursor and show the subset of the matches
* that match the word that is now before the cursor.
* Returns TRUE if the work is done and another char to be got from the user.
@@ -3071,8 +3078,6 @@ ins_compl_prep(c)
compl_matches = 0;
msg_clr_cmdline(); /* necessary for "noshowmode" */
ctrl_x_mode = 0;
- if (save_sm >= 0)
- p_sm = save_sm;
if (edit_submode != NULL)
{
edit_submode = NULL;
@@ -3904,10 +3909,6 @@ ins_complete(c)
{
/* First time we hit ^N or ^P (in a row, I mean) */
- /* Turn off 'sm' so we don't show matches with ^X^L */
- save_sm = p_sm;
- p_sm = FALSE;
-
did_ai = FALSE;
#ifdef FEAT_SMARTINDENT
did_si = FALSE;