Import of r39708 from trunk. If there is a pending Esc (e.g. from cursor-right's CSI, or from ESC-f), also eat the following character. Fixes ESC-f reported by Christoph Naegeli.
Changed paths: