From 48efe624b83947b8236fabafbe6a249a76ccfa7b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 10 Mar 2021 20:17:34 +0000 Subject: Add support for ^R (redraw) in insert mode too. From gotroyb127, OK tb@ --- bin/ksh/ksh.1 | 6 ++++-- bin/ksh/vi.c | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'bin') 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); -- cgit v1.2.3