summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/edit.c b/src/edit.c
index d159911bb..79605666a 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -713,8 +713,8 @@ edit(cmdchar, startln, count)
continue;
}
- /* A printable character: Add it to "compl_leader". */
- if (vim_isprintc(c))
+ /* A printable, non-white character: Add to "compl_leader". */
+ if (vim_isprintc(c) && !vim_iswhite(c))
{
ins_compl_addleader(c);
continue;
@@ -3696,7 +3696,10 @@ ins_compl_delete()
ins_compl_insert()
{
ins_bytes(compl_shown_match->cp_str + curwin->w_cursor.col - compl_col);
- compl_used_match = TRUE;
+ if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
+ compl_used_match = FALSE;
+ else
+ compl_used_match = TRUE;
}
/*