Fixed regression in completion mode.
authorDaniel Carl <danielcarl@gmx.de>
Fri, 21 Dec 2012 14:43:50 +0000 (15:43 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Fri, 21 Dec 2012 14:45:44 +0000 (15:45 +0100)
src/completion.c
src/main.c

index b5eb8d8..304ae8a 100644 (file)
@@ -71,8 +71,6 @@ gboolean completion_complete(gboolean back)
     if (!vp.comps.completions) {
         return FALSE;
     }
-    /* set mode flag for complation */
-    vp.state.mode |= VP_MODE_COMPLETE;
     completion_show(back);
 
     return TRUE;
index b398efd..3af2409 100644 (file)
@@ -311,7 +311,9 @@ static gboolean vp_hide_message(void)
  */
 gboolean vp_set_mode(Mode mode, gboolean clean)
 {
-    if (vp.state.mode & VP_MODE_COMPLETE) {
+    if ((vp.state.mode & VP_MODE_COMPLETE)
+        && !(mode & VP_MODE_COMPLETE)
+    ) {
         completion_clean();
     }
     switch (CLEAN_MODE(mode)) {