bugGNU nano - Bugs: bug #57357, when trying to select what is...


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

bug #57357: when trying to select what is going to be typed, <Tab> indents

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Wed 04 Dec 2019 03:32:27 PM UTC
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Tue 24 Dec 2019 09:12:49 AM UTC, comment #4: 

The improvement in behavior has been released in 4.7.

Benno Schulenberg <bens>
Project Administrator
Thu 05 Dec 2019 10:25:57 AM UTC, comment #3: 

Thanks.  The mistaken space has been removed in commit a921bdad.

Benno Schulenberg <bens>
Project Administrator
Thu 05 Dec 2019 05:02:00 AM UTC, comment #2: 

There is a stray space after the ->.

+    openfile-> mark != openfile->current)

Brand Huntsman <brand>
Wed 04 Dec 2019 04:34:22 PM UTC, comment #1: 

Fixed in git, commit 0271e4a1.

Benno Schulenberg <bens>
Project Administrator
Wed 04 Dec 2019 03:32:27 PM UTC, original submission:  

(Original report by S├ębastien Desreux in https://lists.gnu.org/archive/html/nano-devel/2019-12/msg00000.html.)

When the user sets the mark in order to select what he/she is about to type, any <Tab> that is typed causes the whole line to be indented by one tab, instead of inserting a TAB at the cursor position, as the user intended.

Expected behavior: when the cursor is on the same line as the mark, do not make <Tab> become an indentor but just insert the TAB character at the cursor position, as is done when the mark is off.  (This is also how this feature works in the Geany and Gedit and Kate editors: <Tab> only indents when the selection covers more than one line.)

Attached patch makes the intended behavior change.

(Note that when using softwrap, selecting multiple rows does not necessarily mean that multiple lines are selected, and then <Tab> will just insert a TAB and not indent, which might surprise the user.  But... when using softwrap, it is best to also use --linenumbers or --guidestripe, to make it visually clearer which lines are softwrapped.)

Benno Schulenberg <bens>
Project Administrator


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

Attach Files:


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -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.

    Only logged-in users can vote.





    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-24 bens Open/ClosedOpen => Closed
    2019-12-04 bens StatusIn Progress => Fixed
    2019-12-04 bens Attached File- => Added 0001-input-let-a-Tab-indent-only-when-cursor-line-and-mar.patch, #47994

    Back to the top

    Powered by Savane 3.9