Fix use of obsolete variable ‘last-command-char’
Respect overwrite-mode