nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [Request] allow deleting a marked region without affect


From: Brand Huntsman
Subject: Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer
Date: Thu, 11 Oct 2018 03:37:30 -0600

On Thu, 11 Oct 2018 11:02:27 +0200
Benno Schulenberg <address@hidden> wrote:

> That second cut function (that removes something without affecting
> the cutbuffer) should be made first -- <Del> and <Bsp> will want to
> use it when something is marked.

I thought you said Bsp wouldn't delete regions, should it?


> Or rather: when something is soft marked (shift-selected).  Maybe we
> can get away without an extra option: Pico doesn't know
> Shift-selection, so people who are used to Pico will set the mark
> before making a selection, and in that case <Del> and <Bsp> should
> continue to delete single characters. But when something is
> shift-selected... they could delete the selection.

I use a mixture of mark and shift selections, because marking is easier when 
selecting more than a couple lines. Could there be an option to allow marked 
regions to use it?

The attached patches implement the nuke function and <Del> nuking selections. 
It doesn't check for mark vs shift in <Del>. Nuke is the only name I could come 
up with for the function, if anyone has a better name...

do_nuke_text() could be merged into do_cut_text() but they only share a few 
lines and merging would require a fourth boolean. Should it be merged?

It could also move the cutbuffer instead of the copy+free, but that would 
require a bunch of #ifdef'd code inside update_undo() and I couldn't get it to 
work properly.

Attachment: 0001-add-nuke-function.patch
Description: Text Data

Attachment: 0002-nuke-selection-with-Delete-key.patch
Description: Text Data


reply via email to

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