bugGNU nano - Bugs: bug #57397, unbinding ^/ is ineffective, and...

 
 

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

bug #57397: unbinding ^/ is ineffective, and binding ^/ does not unlist ^_

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Thu 12 Dec 2019 10:18:45 AM UTC  
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Mon 20 Jan 2020 02:55:07 PM UTC, comment #2: 

Fixed in git, commit 9e3fca40.

(It also unbinds ^Space when ^@ gets bound, because also those two are synonymous.  Also ^` is synonymous with those two, but nano does not yet allow to bind ^`.  For symmetry I will make it so, though.  But will not go as far as recognizing also ^2 to ^8 and ^~.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 15 Jan 2020 07:16:56 PM UTC, comment #1: 

When putting for example this at the end of your nanorc:

  bind ^/ nextword main

then running nano and typing ^G, and then searching for M-G, it stills says: "^_     (M-G)     Go to line and column number".  But when you type ^_ (in the edit window), it jumps to the next word.

In short, when a bind or unbind of ^/ is done, it should unbind all relevant occurrences of ^_ too.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 12 Dec 2019 10:18:45 AM UTC, original submission:  

To reproduce, put this at the end of your ~/.nanorc:

  unbind ^/ main

Now run nano, and type ^/.  They keystroke still works (invoking the Go-to-line prompt).

The problem is that the unbind loop (rcfile.c around line 500) searches through the key strings, not the key codes, and by default the canonical synonym of ^/ is bound: ^_.  So in fact unbinding ^/ should unbind ^_.

Checking for this specific synonym wil be ugly.  It would be easier (and quicker) if we could check against the keycode, but at that point the corresponding keycode hasn't been determined yet...

Bug exists since version 4.6, where the ^/ synonym was introduced.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-09 bens Open/ClosedOpen => Closed
    2020-01-20 bens StatusIn Progress => Fixed
    2020-01-20 bens StatusNone => In Progress
        Assigned toNone => bens
    2020-01-15 bens Summaryunbinding ^/ is ineffective => unbinding ^/ is ineffective, and binding ^/ does not unlist ^_

    Back to the top


    Powered by Savane 3.7