bugGNU nano - Bugs: bug #55247, lost the backspace function:...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #55247: lost the backspace function: "Unbound key: ^H"

Submitter:  Norton Warner <nwarner>
Submitted:  Wed 19 Dec 2018 07:05:41 PM UTC
   
 
Severity:  4 - Important Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Mon 25 Mar 2019 01:28:46 PM UTC, comment #15: 

Released in 4.0.

Benno Schulenberg <bens>
Group administrator
Sun 23 Dec 2018 05:54:38 PM UTC, comment #14: 

Fixed in git, commit 55c52c50.  Thanks for reporting.

Benno Schulenberg <bens>
Group administrator
Thu 20 Dec 2018 08:34:24 PM UTC, comment #13: 

No need to remember these changes.  Nano will be changed to work correctly out of the box in the future.  Thanks for testing!

Benno Schulenberg <bens>
Group administrator
Thu 20 Dec 2018 07:33:27 PM UTC, comment #12: 

- global.c: Re-activated FreeBSD lines
- winio.c: Re-activated the #ifdef DEBUG section
- global.c: Changed line
    add_to_sclist(MMOST, "^H", 0, do_backspace, 0);
  to
    add_to_sclist(MMOST, "^H", 8, do_backspace, 0);

Recompiled, seems to work in both QVT and at the native console!

One last question: will I need to remember to make this change for future versions?

Norton Warner <nwarner>
Thu 20 Dec 2018 06:52:40 PM UTC, comment #11: 

Oof!  That is one weird kind of terminal!  Producing ^D when you press <Delete>?  Looking in the terminfo database of ncurses, there is just one terminal that does that: mime314 from Microterm, from the eighties!  By sheer luck, Pico (and thus nano) has chosen to make ^D delete a character in the normal (rightward) way.

Okay.  Thanks for the info.  QVT will work as long as we don't fiddle around with the current settings.

Can you try one more thing?  Uncomment (comment back in) the four "FreeBSD" lines in src/global.c, and then search for ^H", (literal string, four characters, quote included), then change the subsequent first 0 to an 8. To be more specific, change this line:
  add_to_sclist(MMOST, "^H", 0, do_backspace, 0);
to this:
  add_to_sclist(MMOST, "^H", 8, do_backspace, 0);

Save, recompile, and then run 'src/nano --ignore README' and see if <Delete> and <Backspace> work normally.

Benno Schulenberg <bens>
Group administrator
Thu 20 Dec 2018 06:35:51 PM UTC, comment #10: 

Now when I'm at the console natively, I get:

Sequence of hex codes: 107     ;^H

Sequence of hex codes: 107     ;<bcksp>

Sequence of hex codes: 14a     ;<del>

But I never had a problem with nano when at the console directly.

Norton Warner <nwarner>
Thu 20 Dec 2018 06:26:49 PM UTC, comment #9: 

Both return:

Sequence of hex codes:   8

Sequence of hex codes:   8

Sequence of hex codes:   4

Sequence of hex codes:  18

Keep in mind the original FreeBSD part you had me comment off is STILL commented off.

Norton Warner <nwarner>
Thu 20 Dec 2018 11:40:43 AM UTC, comment #8: 

And can you do the same four keystrokes when running:

  src/nano --ignore -K  2>TRAIL; cat TRAIL

(the same command with an added -K option).

Benno Schulenberg <bens>
Group administrator
Thu 20 Dec 2018 09:45:50 AM UTC, comment #7: 

Okay.  Good that it works now.

But could you do something for me?  Because it is hard to find people with real FreeBSD boxes.

Could you search in src/winio.c for "hex codes" (without the quotes) and then comment out or remove the #ifdef and #endif directives around those four lines, recompile, and then run:

  src/nano --ignore 2>TRAIL; cat TRAIL

and then type, in this order, these four keystrokes:
  ^H  <Backspace>  <Delete>  ^X
and then paste the output?

Benno Schulenberg <bens>
Group administrator
Wed 19 Dec 2018 08:01:39 PM UTC, comment #6: 

Perfect! Works like a charm, thank you kindly good Sir!

Norton Warner <nwarner>
Wed 19 Dec 2018 07:51:34 PM UTC, comment #5: 

Actually, I installed Nano 3.2 originally... that's where I'm seeing the error. Only reason I referenced 3.1 is because that's where I read that something had been done to the ^H functionality. So I just assumed that's where the problem originated.

I'll do what you said and re-compile and let you know how it goes.

QVT is an old telnet application, totally free, very customizable. Main problem is that it was written before the days of sshd, so running remotely is totally insecure. I guess I could configure to run through sshd on my Unix box; but since I use it to access my Unix boxes from my office to the lab (adjacent room), I don't worry about it.

Attached is a screenshot of the About box.

(file #45700)

Norton Warner <nwarner>
Wed 19 Dec 2018 07:38:39 PM UTC, comment #4: 

If you want to get around it, search for "FreeBSD" (without the quotes) in src/global.c and delete all those four lines of that #if clause.  (You can do the same for nano version 3.2.)

(What is a QVT?  A kind of virtual terminal running in a graphical environment?)

Benno Schulenberg <bens>
Group administrator
Wed 19 Dec 2018 07:34:45 PM UTC, comment #3: 

Forgot to say I have Nano 2.9.8 on another FreeBSD 11.2(i386), works just fine.

This one that fails is amd64.

Norton Warner <nwarner>
Wed 19 Dec 2018 07:32:44 PM UTC, comment #2: 

Compiled on FreeBSD 11.2, not seeing the infocmp command.

Norton Warner <nwarner>
Wed 19 Dec 2018 07:24:47 PM UTC, comment #1: 

On what platform are compiling nano?  Linux, some BSD, Mac?

What is the output of:  infocmp | grep -e kbs -e kdc


Benno Schulenberg <bens>
Group administrator
Wed 19 Dec 2018 07:05:41 PM UTC, original submission:  

Looks like v3.1 did some monkeying around with the backspace.

I use an old QVT product, emulates a vt220. I now lost the backspace key. I've tried to put in a binding in .nanorc like:

bind ^H backspace main

...nothing, still "Unbound key"

Not sure why it doesn't bind it like it's documented, nor do I know how to get it working again, short of installing a previous version.

Norton Warner <nwarner>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #45700:  qvt.gif added by nwarner (5KiB - image/gif)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by nwarner (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-25 bens Open/ClosedOpen Closed
    2018-12-23 bens StatusNone Fixed
        SummaryLost backspace, &quot;Unbound key: ^H&quot; lost the backspace function: "Unbound key: ^H"
    2018-12-19 nwarner Attached File- Added qvt.gif, #45700
    2018-12-19 bens Severity3 - Normal 4 - Important
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code