nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH 1/2 V3] cutting: when ^K does not actually cut a


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH 1/2 V3] cutting: when ^K does not actually cut anything, do not add an undo item
Date: Tue, 1 Jan 2019 13:18:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Op 31-12-18 om 19:37 schreef David Ramsey:
> 1. In patch 0001. in nothing_needs_cutting() and do_cut_till_eof(), you
> have the check:
> 
>     openfile->current->next == NULL
> 
> Wouldn't the check:
> 
>     openfile->current == openfile->filebot
> 
> be simpler, clearer as to what it's doing, and accomplish the same
> thing?

I don't think it's simpler, nor clearer.  But it is longer, and would
necessitate a linewrap for the second condition.  also, I like the rhythm
of NULL, \0, NULL.

> 2. In patch 0002, the messages "Nothing was cut" and "The cutbuffer is
> empty" seem inconsistent, given that cut and uncut/paste are supposed to
> be inverses of each other.  Maybe use "Nothing to cut" and "Nothing to
> uncut", or something similar?

Well, I like to see contrast, in variable names, and in messages.  When
I would "Nothing to paste", I would think "Nothing to paste...? Ah, the
cutbuffer is empty. Say that then."  Also, it introduces the word cutbuffer,
the concept, which the user could then search for in the help text or the
man page.

And I chose "Nothing was cut" instead of "Nothing to cut" because when
doing ^6 followed by ^K (or followed by <Bsp> or <Del> when using --zap),
"Nothing to cut" looks weird.  My reaction would be: "What do you mean,
nothing to cut? Type it again and it *does* cut."

But maybe, when the mark covers zero characters, and a cutting key is
pressed, we should treat it as if the mark is off?

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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