[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [BUGS?] indenting shift selections

From: Brand Huntsman
Subject: [Nano-devel] [BUGS?] indenting shift selections
Date: Thu, 7 Dec 2017 18:21:04 -0700

echo -e "a\nb" > /tmp/nanotestfile ; nano /tmp/nanotestfile

Hold shift and press down arrow once and then indent. The selection is removed 
after indenting. Undo and press up arrow to return to first line. Hold shift 
and press down arrow twice and then indent.

Marked selections always persist after indenting/unindenting. And shift 
selections always persist when unindenting. Shift selections only persist after 
an indent if the cursor line is blank, because any content would cause the 
cursor to indent(move) and reset the selection.

Is this behavior intended or should indenting shift selections always persist 
like marked selections do and like unindenting them does? Would it be possible 
for do_indent() to update the cursor position in the selection so it doesn't 
get reset?

Also notice when indenting a marked or shift selection, the indent on the first 
line isn't added to the selection. It doesn't matter if only indenting, and 
unindenting after works fine too, but copying or cutting the selection won't 
get that first line's indentation. Is this behavior intended or a bug?

Always adding the indentation to the selection by expanding both start and end 
positions of selection to hold the new indents should solve both issues.

If it is decided to fix this, are there any other features that work on 
selections and cause the cursor to move?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]