diff --git a/NEWS b/NEWS index 6ffeb9b04..423f52447 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,10 @@ Any uppercase BUG_* names are modernish shell bug IDs. that 'unalias -a' does not remove them. Shell functions can now use these names, which improves compatibility with POSIX shell scripts. +- The End key escape sequence '^[[F' is now handled in the emacs and vi editing + modes. The End key moves the cursor to the end of the line (in contrast to + the Home key doing the opposite). + 2020-07-14: - Fixed a bug that caused 'set -b' to have no effect. diff --git a/src/cmd/ksh93/edit/emacs.c b/src/cmd/ksh93/edit/emacs.c index 87def4a57..56e3fb058 100644 --- a/src/cmd/ksh93/edit/emacs.c +++ b/src/cmd/ksh93/edit/emacs.c @@ -1105,6 +1105,7 @@ static int escape(register Emacs_t* ep,register genchar *out,int count) case 'H': ed_ungetchar(ep->ed,cntl('A')); return(-1); + case 'F': case 'Y': ed_ungetchar(ep->ed,cntl('E')); return(-1); diff --git a/src/cmd/ksh93/edit/vi.c b/src/cmd/ksh93/edit/vi.c index f2ac65604..f4b15466a 100644 --- a/src/cmd/ksh93/edit/vi.c +++ b/src/cmd/ksh93/edit/vi.c @@ -1669,6 +1669,7 @@ static int mvcursor(register Vi_t* vp,register int motion) case 'H': tcur_virt = 0; break; + case 'F': case 'Y': tcur_virt = last_virt; break;