[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [Request] allow deleting a marked region without affect
From: |
Liu Hao |
Subject: |
Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer |
Date: |
Tue, 9 Oct 2018 14:06:45 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
在 2018-10-09 13:53, Brand Huntsman 写道:
I use X11's clipboard to hold text because nano overwrites the cutbuffer when I
cut a line. It would be okay if nano had a second cut function that didn't
write to cutbuffer, and should be easy to add it as a flag in the existing cut
function. But the external clipboard can also be used as a secondary clipboard,
and having nano use it would eliminate this feature.
Yes this is also consistent with a 'secondary clipboard' when working on
a Linux machine over SSH on Windows.
Having Bsp/Del cut selected text is logical and most people expect it since
everything else works that way. And word cutting doesn't overwrite cutbuffer,
so Bsp/Del shouldn't either. If text is marked, Bsp/Del could call the second
cut function mentioned above and not perform their normal behavior.
But having a second cut function (and key) would be far more useful than having
Bsp/Del cut selected text, since the second cut function could also cut
unmarked lines and be used in alternate cuttoend/cuttostart macros that
wouldn't overwrite cutbuffer. Making Bsp/Del use it could be optional, but I
don't see why, you can undo mistakes. And who actually uses Bsp/Del while text
is marked?
I almost forgot that. Initially nano didn't had Undo/Redo, which might
be the reason why there had been the cut buffer - in case of mistakes
the text could be uncut. But today we have a nice Undo feature and the
cut buffer mainly plays a role as the clipboard, so having something
that deletes text without altering the cut buffer seems reasonable.
The problem is that if Bsp/Del do this, then so should the copy function and
character keys. If text is marked, they could call the second cut function and
then perform their normal behavior. If that is too complicated to do, then
Bsp/Del shouldn't do it either, for consistency. But the second cut
function/key should be added. :)
When the mark is active, Bksp/Del keys delete selection, while any
character key replaces the selection with a new character. Either
operation is atomic and does not need a second Undo operation to revert
when necessary.
Also, why does Bsp unmark shift selections but Del doesn't?
--
Best regards,
LH_Mouse
- [Nano-devel] [FEATURE-REQUEST] Deleting marked region?, Liu Hao, 2018/10/07
- Re: [Nano-devel] [FEATURE-REQUEST] Deleting marked region?, markweston, 2018/10/08
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer, Benno Schulenberg, 2018/10/08
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer, Liu Hao, 2018/10/08
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer, Brand Huntsman, 2018/10/09
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer,
Liu Hao <=
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer, Benno Schulenberg, 2018/10/09
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer, Brand Huntsman, 2018/10/09
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer, Benno Schulenberg, 2018/10/11
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer, Brand Huntsman, 2018/10/11
- Re: [Nano-devel] [Request] allow deleting a marked region without affecting the cutbuffer, Benno Schulenberg, 2018/10/11