summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2021-03-10 20:17:34 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2021-03-10 20:17:34 +0000
commit48efe624b83947b8236fabafbe6a249a76ccfa7b (patch)
treef4291e66c98e3201036c6b060464b5343b198688 /bin
parent6aca62c1859f3284fed525382c51188691f3799a (diff)
Add support for ^R (redraw) in insert mode too.
From gotroyb127, OK tb@
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/ksh.16
-rw-r--r--bin/ksh/vi.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1
index da05ef4747e..a8dd9201f62 100644
--- a/bin/ksh/ksh.1
+++ b/bin/ksh/ksh.1
@@ -1,8 +1,8 @@
-.\" $OpenBSD: ksh.1,v 1.212 2021/03/08 06:20:50 jsg Exp $
+.\" $OpenBSD: ksh.1,v 1.213 2021/03/10 20:17:33 millert Exp $
.\"
.\" Public Domain
.\"
-.Dd $Mdocdate: March 8 2021 $
+.Dd $Mdocdate: March 10 2021 $
.Dt KSH 1
.Os
.Sh NAME
@@ -5060,6 +5060,8 @@ See the
command in
.Sx Emacs editing mode
for more information.
+.It ^R
+Redraw the current line.
.It ^V
Literal next.
The next character typed is not treated specially (can be used
diff --git a/bin/ksh/vi.c b/bin/ksh/vi.c
index 51b7184ff5a..f1ef401161b 100644
--- a/bin/ksh/vi.c
+++ b/bin/ksh/vi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vi.c,v 1.58 2021/03/10 20:06:04 millert Exp $ */
+/* $OpenBSD: vi.c,v 1.59 2021/03/10 20:17:33 millert Exp $ */
/*
* vi command editing
@@ -658,6 +658,10 @@ vi_insert(int ch)
do_clear_screen();
break;
+ case CTRL('r'):
+ redraw_line(1, 0);
+ break;
+
case CTRL('i'):
if (Flag(FVITABCOMPLETE)) {
complete_word(0, 0);