aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/vi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 38ce1fdf0..f0bbc9518 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -3100,6 +3100,18 @@ static void colon(char *buf)
3100 } 3100 }
3101 len_R = strlen(R); 3101 len_R = strlen(R);
3102 3102
3103 if (len_F) { // save "find" as last search pattern
3104 free(last_search_pattern);
3105 last_search_pattern = xstrdup(F - 1);
3106 last_search_pattern[0] = '/';
3107 } else if (last_search_pattern[1] == '\0') {
3108 status_line_bold("No previous search");
3109 goto ret;
3110 } else {
3111 F = last_search_pattern + 1;
3112 len_F = strlen(F);
3113 }
3114
3103 if (e < 0) { // no addr given 3115 if (e < 0) { // no addr given
3104 q = begin_line(dot); // start with cur line 3116 q = begin_line(dot); // start with cur line
3105 r = end_line(dot); 3117 r = end_line(dot);