Skip to content

Commit a54f600

Browse files
committed
Fix ^R glitch.
1 parent d31fcdf commit a54f600

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/ksh/emacs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,10 @@ x_search(char *pat, int sameline, int offset)
888888
for (hp = x_histp - (sameline ? 0 : 1) ; hp >= history; --hp) {
889889
i = x_match(*hp, pat);
890890
if (i >= 0) {
891-
if (offset < 0)
891+
if (offset < 0) {
892+
x_goto(xep);
892893
x_e_putc('\n');
894+
}
893895
x_load_hist(hp);
894896
x_goto(xbuf + i + strlen(pat) - (*pat == '^'));
895897
return i;

0 commit comments

Comments
 (0)