summaryrefslogtreecommitdiffhomepage
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/vi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 4fda6aebf..96e6af318 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -1809,8 +1809,10 @@ static void dot_to_char(int cmd)
do {
do {
q += dir;
- if ((dir == FORWARD ? q > end - 1 : q < text) || *q == '\n')
+ if ((dir == FORWARD ? q > end - 1 : q < text) || *q == '\n') {
+ indicate_error();
return;
+ }
} while (*q != last_search_char);
} while (--cmdcnt > 0);