bugGNU nano - Bugs: bug #56960, indenting a region with...

 
 

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

bug #56960: indenting a region with <Tab> stops working when M-} is rebound

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Sat 28 Sep 2019 10:12:40 AM UTC  
 
Severity:  4 - Important Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Sat 05 Oct 2019 09:46:39 AM UTC, comment #3: 

The fix has been released in nano-4.5.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 28 Sep 2019 10:44:20 AM UTC, comment #2: 

Fixed in git, commit 5103bfe6.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 28 Sep 2019 10:16:26 AM UTC, comment #1: 

Apparently the following line in src/global.c is ineffective in retaining a hardbind to the indent function:

  add_to_sclist(MMAIN, "Tab", TAB_CODE, do_indent, 0);

So... we will need a dedicated, special keycode to be hardbound to do_indent(), and this keycode should be produced when <Tab> is pressed while the mark is on.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 28 Sep 2019 10:12:40 AM UTC, original submission:  

To reproduce, put the following line at the end of your .nanorc:

  bind M-} findnext main

(And there should be no other key bound to the 'indent' function.)

Now run:

  src/nano +3,18 NEWS

Then press <Shift+Down> three times, and then <Tab>.

See that, instead of the marked four lines getting indented, a TAB character is inserted at the cursor position and the mark is unset.

Expected behavior: the <Tab> key should indent a marked region, no matter what unbindings or rebindings the user has made.

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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-05 bens Open/ClosedOpen => Closed
    2019-09-28 bens StatusNone => Fixed

    Back to the top


    Powered by Savane 3.7