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

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 28 Sep 2019 10:12:40 AM UTC
   
 
Severity:  4 - Important Status:  Fixed
Assigned to:  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>
Group administrator
Sat 28 Sep 2019 10:44:20 AM UTC, comment #2: 

Fixed in git, commit 5103bfe6.

Benno Schulenberg <bens>
Group administrator
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>
Group administrator
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>
Group administrator

 

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

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)
  •  

    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 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.13-758e.
    Corresponding source code