summaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c
index d2d2670..31ad96c 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -3293,8 +3293,11 @@ static void do_cmd(char c)
buf[0] = c;
buf[1] = '\0';
q = get_input_line(buf); // get input line- use "status line"
- if (q[0] && !q[1])
+ if (q[0] && !q[1]) {
+ if (last_search_pattern[0])
+ last_search_pattern[0] = c;
goto dc3; // if no pat re-use old pat
+ }
if (q[0]) { // strlen(q) > 1: new pat- save it and find
// there is a new pat
free(last_search_pattern);