static int compl_get_longest = FALSE; // put longest common string
// in compl_leader
-// This flag indicates that one of the items in the match list is currently
-// selected. FALSE when no match is selected or the match was edited or using
-// the longest common string.
+// This flag is FALSE when no match is selected (by ^N/^P) or the match was
+// edited or using the longest common string.
static int compl_used_match;
// didn't finish finding completions.
curwin->w_cursor.col -= (colnr_T)(cp_str_len - leader_len);
}
}
- if (match_at_original_text(compl_shown_match) || preinsert)
+ if (match_at_original_text(compl_shown_match)
+ || (preinsert && !compl_autocomplete))
compl_used_match = FALSE;
else
compl_used_match = TRUE;
" Should not work with fuzzy
set cot+=fuzzy
call DoTest("f", 'f', 2)
+ set cot-=fuzzy
+
+ " Verify that redo (dot) works
+ call setline(1, ["foobar", "foozbar", "foobaz", "changed", "change"])
+ call feedkeys($"/foo\<CR>", 'tx')
+ call feedkeys($"cwch\<C-N>\<Esc>n.n.", 'tx')
+ call assert_equal(repeat(['changed'], 3), getline(1, 3))
%delete _
let &l:undolevels = &l:undolevels