mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
On every modern system, the forward-delete key on PC/Mac keyboards generates the VT220 sequence ESC [ 3 ~. Every other shell with an editor handles this now, ksh93 seems to be the last not to. src/cmd/ksh93/edit/emacs.c: escape(): - Handle the ^[[3 as part of normal escape processing, then read an extra character to check for the final '~'. If detected, insert an ERASECHAR key event. src/cmd/ksh93/edit/vi.c: mvcursor(): - Replace the ^[[3~ sequence by an 'x' command. We have to special-case its processing, because vi mode parses numbers as repetition operators. The escape sequence contains a number, making it incompatible with normal command handling. This means number repetitions don't work with the forward-delete key. If that annoys anyone enough to fix it, a patch would be welcome. For now, it will do to make the forward-delete key stop exhibiting bizarre behaviour (beep + change case + move forward). src/cmd/ksh93/sh.1 - Copy-edit emacs documentation for VT220-style sequences; map them to their actual key, otherwise it's meaningless to the reader. - Document the new forward-delete key behaviour for emacs mode. - Leave the forward-delete key for vi mode undocumented for now, as repetitions don't work, so it doesn't really match the vi canon. (OTOH, it doesn't work in vim, either...) |
||
---|---|---|
.. | ||
cmd | ||
lib | ||
Makefile | ||
Mamfile |