I've run into a very odd problem connecting to my Raspberry Pi (running Raspbian) using PuTTY for Windows — the ANSI "cursor" position isn't getting updated correctly.
This manifests in a couple of different ways that I've discovered so far. The most obvious (and irritating) problem is that, when I press backspace, it moves the cursor forwards instead of backwards. For example, here I tried to type
bash --version, but accidentally omitted the
s and had to backspace once to correct it:
pi@raspberrypi:~$ bash --veri sion GNU bash, version 5.0.3(1)-release (arm-unknown-linux-gnueabihf) …
You can see that the incorrect
i is still present, followed by a space where I pressed backspace, followed by the rest of the command. The command still executes correctly, which means the keystrokes are being interpreted correctly; they just aren't being displayed correctly.
Another case I've seen is that, upon resizing the PuTTY window, the prompt is redisplayed starting one line below the cursor position rather than over the top of the existing one. For example, if I resize the window twice, I see the following without pressing any keys at all:
pi@raspberrypi:~$ pi@raspberrypi:~$ pi@raspberrypi:~$
Has anyone run into anything like this before or otherwise knows what's going on? I haven't been successful finding a solution online and nothing in PuTTY's settings jumps out at me as a possible solution.