bugGNU nano - Bugs: bug #54642, on FreeBSD and NetBSD, ^H now does...

 
 

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

bug #54642: on FreeBSD and NetBSD, ^H now does a cutwordleft

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 10 Sep 2018 06:58:44 PM UTC
   
 
Severity:  4 - Important Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Wed 19 Sep 2018 07:20:49 PM UTC, comment #6: 

Released in 3.1.

Benno Schulenberg <bens>
Group administrator
Wed 12 Sep 2018 12:40:36 PM UTC, comment #5: 

Fixed in git, commit 09ab2e3d.

(For a work-around setting, look at:

  nano --help | grep -- -K

See that the long option for -K is --rebindkeypad.  So you can use "set rebindkeypad" in your nanorc for a temporary workaround.)

Benno Schulenberg <bens>
Group administrator
Wed 12 Sep 2018 06:11:29 AM UTC, comment #4: 

Another way of avoiding this bug is setting TERM to xterm (instead of screen-256color...).

Peter Passchier <pepa65>
Wed 12 Sep 2018 05:28:31 AM UTC, comment #3: 

If you compile nano, the attached patch reverts the commit that causes the problem.

Several common terminals are impacted by this: https://bugs.archlinux.org/task/60026

(file #44987)

Brand Huntsman <brand>
Wed 12 Sep 2018 12:05:19 AM UTC, comment #2: 

I hit this bug when using nano under tmux. Is there a workaround for this? I mean having a setting in .nanorc? Evoking with -K does seem to solve it, but I would prefer a change in setting.

Peter Passchier <pepa65>
Tue 11 Sep 2018 03:33:22 AM UTC, comment #1: 

urxvt 9.21 on Linux, not *BSD. And backspace is a different key than ^H (^bsp produces ^H). I had cutwordleft bound to ^H and backspace was still a backspace. I can also bind any function to ^H and it works in 3.0 even though backspace now does cutwordleft.

nano.c:2583:43: error: 'CONTROL_BACKSPACE' undeclared (first use in this function); did you mean 'KEY_BACKSPACE'?
  controlshiftdelete = get_keycode("kDC6", CONTROL_BACKSPACE);

If this had compiled, would it override the ^H bind? I wouldn't care, but anyone who has ^H bound to something else might. If so, disable the forced bind if ^H is bound in nanorc.

Brand Huntsman <brand>
Mon 10 Sep 2018 06:58:44 PM UTC, original submission:  

Since commit e6429e78, ^H deletes the word to the left of the cursor on some systems -- at least on NetBSD and FreeBSD.

The problem is this line:

  controlshiftdelete = get_keycode("kDC6", KEY_BACKSPACE);

Instead of KEY_BACKSPACE it should use something like CONTROL_BACKSPACE, similar to the other get_keycode() calls.

(Indirectly reported by Brand Huntsman in http://lists.gnu.org/archive/html/nano-devel/2018-09/msg00030.html.)

Benno Schulenberg <bens>
Group administrator

 

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

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pepa65 (Posted a comment)
  • -email is unavailable- added by brand (Posted a comment)
  • -email is unavailable- added by bens (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-19 bens Open/ClosedOpen Closed
    2018-09-12 bens Severity3 - Normal 4 - Important
        StatusNone Fixed
    2018-09-12 brand Attached File- Added revert-controlshiftdelete.patch, #44987

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code