help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unexpected behaviour of Backspace when binding ^H


From: Benno Schulenberg
Subject: Re: Unexpected behaviour of Backspace when binding ^H
Date: Fri, 10 Apr 2020 17:28:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

Op 10-04-2020 om 12:07 schreef Ciprian Tomoiaga:
> Yes, I am now running 4.9.
> It is behaving like you described: Ctrl+H and Backspace are equivalent when
> running `nano` and they both do 'backspace', regardless of the binding of ^H.
> However, running `nano -K` behaves correctly, namely ^H replaces and backspace
> erases.

Okay, I'm glad that the rebinding of ^H works now for you.

But that you need to use -K to get it to work means that your terminal
emulator does not set the TERM environment variable correctly.

> As for running without mouse support, that's OK, I never used mouse to
> click somewhere. And scrolling the mouse still moves the cursor in nano, so
> that's great.

That the scroll wheel (or a two-fingered move on a touchpad) causes the
cursor to move is something that ncurses does, I think.  If nano detects
such a roll, it will scroll the screen three rows at a time.

> It seems the Sakura emulator is correct, this is what I'm getting:
> infocmp| grep -o kbs=..
> kbs=^H

This alone says nothing.  You have to compare it with what gets shown when
you type at the prompt: ^V <Backspace> (or inside nano: M-V <Backspace>).
When those two are the same, the terminal is configured correctly (well,
at least for the backspace key).

> So, is this a bug that I should file with iTerm2 ?

I don't know.  Again, you have to compare the output of:
  infocmp | grep -o kbs=..
with the output of:
  ^V <Backspace>

If they differ, iTerm2 does not set the TERM variable correctly.


On my Xfce terminal:
$ infocmp | grep -o kbs=..
kbs=^?
$ ^?  (<== this is the result of typing ^V <Backspace>)

They are the same, so my terminal is configured properly.


By the way, you will want to update nano to 4.9.2.  :)

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]