nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] [RFC] selecting text by holding Shift


From: Benno Schulenberg
Subject: [Nano-devel] [RFC] selecting text by holding Shift
Date: Thu, 19 Nov 2015 14:41:55 +0100

Hi all

Last year Chris remarked [1] that it would be nice to have the Shift+Arrow keys
available for selecting text.  Recently someone on Savannah remarked [2] that
he or she was working on this, but nothing materialized.

So... now I am planning to implement this.

But already I'm wondering: how should this work?  We already have a method for
marking text: pressing ^6 or M-A and then moving the cursor.  Let's call this
setting a hard mark.  Setting a soft mark would then be done as soon as you
hold down Shift together with a cursor-movement key (Left, Right, Home, End,
Up, Down, PageUp, PageDown).

Now... how should these hard and soft marks interact?

1)  When a hard mark is set, ignore Shift, just act as if no Shift is being
held during all cursor movement.  This means that you can't set a soft
mark when a hard mark is set.

2)  As soon as Shift is held together with a cursor key, convert the hard
mark to a soft one.  That also means: as soon as then a cursor movement is
done without Shift, the mark is forgotten.

3)  When Shift is held together with a cursor key, forget any hard mark
and put the soft mark at the current position.

4)  When Shift is held together with a cursor key, temporarily forget a
hard mark, put the soft mark at the current position, and when the soft
mark is unset, restore the hard mark at the position where it was.

The fourth option would be the most powerful, but probably also the most
confusing.  And there will be trouble when operations with the soft mark
delete the position where the hard mark was.  So this is not going to work.

I think the first option will be annoying: the user will feel that nano
doesn't respond to Shift.  So I think the choice is between 2) and 3):
either continue with the existing selection, or start a new selection
from the current position.

I lean toward option two.  What do you say?

Benno


[1] https://lists.gnu.org/archive/html/nano-devel/2014-04/msg00052.html
[2] https://savannah.gnu.org/patch/?8782

-- 
http://www.fastmail.com - Email service worth paying for. Try it for free




reply via email to

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