Setting the 'altmeta' option affects how ESC is handled. Normally it is for terminals/emulators which transmit two character sequence ESC c when the user types Meta+c, but it can also be used to construct meta characters 'manually' by typing ESC c. Unfortunately setting this option has a side-effect of requiring a second character after ESC before our readchar() will return, so it is only honored when parse() wants the next command, not for general input. When readchar() was recently split into two parts, the use of static variable 'alt_esc' by parse() and readchar() was removed. That resulted in requiring the user to type a second character whenever ESC was typed, instead of just when it was transmitted or typed as the prefix of a command that uses a meta-character keystroke. Instead of just putting 'alt_esc' back, do things differently by adding static 'getting_cmd' flag instead. Fixes #558
76 KiB
76 KiB