nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] how Alt+6 should behave


From: Benno Schulenberg
Subject: Re: [Nano-devel] how Alt+6 should behave
Date: Mon, 08 Feb 2016 22:14:53 +0100

On Sat, Feb 6, 2016, at 21:01, Rishabh Dave wrote:
> Patch is over source nano-2.5.1 with no previous patches done using diff
> under --recursive and --unified options.

Wow...!  Far too many changes!  This cannot be the right solution.

> However it isn't complete as screen doesn't scroll if marking
> goes beyond marking window and downwards and rightwards don't behave as we
> want. Cursor, on copying, falls back to a line/character below/right of the
> other end of marking. That is due to underlying data structures, I guess.

Don't know what you're trying to do there, but from a glimpse
at the patch you seem to make both the mark and the cursor
movable.  That's no good.  The mark, once set, never moves.
Only the cursor moves.  The mark can only be set and unset,
it cannot be dragged elsewhere.

> >   It should just copy the marked portion to the
> > cutbuffer, unset the mark, and leave the cursor wherever it
> > was at the moment that Alt+6 was pressed.  Nor should it
> > scroll the screen in any way.
> 
> Any way? It should scroll when marking goes out of screen otherwise how
> would user know how much he/she has selected?

Of course.  But I'm not talking about marking/selecting stuff.
Alt+6 is only concerned with the moment that things have
already been marked, and it is time to *copy* this marked
region.  The act of copying should only do that, /and/ unset
the mark, but for the rest do nothing at all with the screen.

Also see comment #1 at https://savannah.gnu.org/bugs/?46980.

> I saw this behaviour for first time: if a couple of line are marked, and if
> we use backspace, whole block of selected text moves back instead of
> deleting it.

Yes, that is how things behave in nano, because that's how Pico
behaves.  It's weird, but that's how it is, and will stay by default.

> Marked text should be deleted otherwise mark is not useful
> there.

You could propose to add an option to make Delete and Backspace
and simply any keystroke overwrite the current marked region,
to make nano behave more like other editors.  There was a
proposal in https://savannah.gnu.org/patch/?8782, but
nothing materialized.

Benno

-- 
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]