Unexpected behaviour of Backspace when binding ^H

Ciprian Tomoiaga <[email protected]> Mon, 9 Mar 2020 17:09:41 +0100
Newsgroups gmane.editors.nano.general
Message-ID <CAH1MQxx0nPSbqAr=JU_2S5LiRdAD47J5FGyivyKmsdFr2s7GTQ@mail.gmail.com>
Hi all,

I have just updated to nano 4.8 from v2.9.8. Consequently, some settings in
my nanorc no longer worked, such as `uncut`, `copytext` and `searchagain`.
These were easy to fix.

However, there is one that is baffling me.
I am binding ^H to `replace all`. This has the unexpected result that
pressing Backspace(1) enters the replace menu. I know that on some
terminals Backspace generates ^H, but if I use the shortcut for `Verbatim
Input` and press Backspace, I get `^?`. Starting `nano -K` has the same
problem so it probably isn't because of ncurses.
Note that using Delete(2) works as expected; this generates the verbatim
`^[[3~`.

I have seen that v3.1 had a fix about this problem, maybe my terminal
escaped that? I am using iTerm2 v3.3.9 on MacOS 10.15.2, with zsh v5.8.
This problem also exists in the Terminal app of MacOS.

Is this a bug or I misunderstood something?

Many thanks,
Ciprian

P.S. I am not subscribed to this list, I hope I will receive your replies ^^

(1) Since I switched to MacOS, Backspace and Delete have gotten a bit
blurry in my mind. By Backspace I mean "kill to the left", a simple press
on the poorly-named "delete" button.
(2) as above. By Delete I mean "kill to the right", pressing `Fn+delete`.