index 4ceb369..94da8c2 100644
--- a/src/edit.c
+++ src/edit.c
@@ -2561,8 +2561,10 @@ ins_compl_add(str, len, icase, fname, cptext, cdir, flags, adup)
 
     /*
      * Find the longest common string if still doing that.
+     * Don't insert the longest match when refresh always is set.
      */
-    if (compl_get_longest && (flags & ORIGINAL_TEXT) == 0)
+    if (compl_get_longest && (flags & ORIGINAL_TEXT) == 0
+	    && !compl_opt_refresh_always)
 	ins_compl_longest_match(match);
 
     return OK;
