[Top][All Lists]

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

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

From: Rishabh Dave
Subject: Re: [Nano-devel] how Alt+6 should behave
Date: Thu, 18 Feb 2016 19:02:42 +0530

Yes, I was wrong. In case of bottom to top (backward) marking, those lines of code are not redundant. I missed that case entirely as only forward marking was in my mind, sorry about that.

But, I don't know how to re-calculate lost values from move_to_filestruct() and copy_from_filestruct(). Those functions are pretty complicated for me.

On Wed, Feb 17, 2016 at 1:39 AM, Benno Schulenberg <address@hidden> wrote:

On Sun, Feb 14, 2016, at 07:30, Rishabh Dave wrote:
> Value of edittop is lost at move_to_filestruct(). Same goes for current but
> that is easily calculated as it is bottom of marking.

Yes, that's how it behaves now.  But that's not what I want.

> As far I could try,
> there is no way to recalculate edittop's value. So, we will have to backup
> that value before calling move_to_fielstruct() and copy_from_filestruct()
> basically what you did in patch you sent. But, saving current's and
> current_x's value is redundant.

No, it's not redundant.  It changes the behavior of Alt+6 to the
way I think it should behave: *don't move the cursor* when all I
want nano to do is: to copy the currently marked region to the
cutbuffer.  So all that should visually happen is that the highlight
disappears.  For the rest everything stays the same: the screen
does not scroll, the cursor does not jump elsewhere.

The six lines in that patch make Alt+6 behave exactly as I wish
it to behave.


-- - mmm... Fastmail...

reply via email to

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