nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] Implement incremental search


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] Implement incremental search
Date: Wed, 14 Feb 2018 12:02:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0


Op 14-02-18 om 01:30 schreef Brand Huntsman:
When a match isn't found:
   - beep
   - change prompt color (see below)
   - display "NOT FOUND" in the prompt
   - remove highlight from the last match
   - don't jump to start until prompt is closed

I would say: all of those, except removing the highlight.  I would
want to keep the highlight so that I can see what *was* found, and
can see what I would have to type if I want to see more of those
occurrences, and can see where the cursor will land if I decide to
hit <Enter> anyway.

An 'errorcolor' could be added to nano that not only changes the incremental 
prompt color when a match isn't found, but _all_ error messages that currently 
use statuscolor.

Yes, I would like that.  It has been proposed before:
  http://lists.gnu.org/archive/html/nano-devel/2015-04/msg00047.html
  http://lists.gnu.org/archive/html/nano-devel/2015-04/msg00059.html
But no one responded then, so I let it be.

If color is enabled and terminal supports color, it could default to 
"bold,black,red",

Black on red has low contrast on my terminal.  I would choose "bold,white,red".

if not, just use "bold,reverse" instead of the normal "reverse". This would be 
a huge improvement across nano, as it would visually separate all the 'info' messages from actual 
'error' messages.

Agreed.

Yes, ambivalent, that's what I am too.  It's a nice feature, but...
unnecessary.  This is something that I would hide behind a compile
flag, --enable-extra.

[I haven't looked at the patch yet...]
I would never type ^I to enable it, but if it was always on then it might be 
useful.

One can switch it on "by default" by adding 'set incremental' in one's nanorc.

Unless it immediately searches after every key press. I would never use the 
feature without a ~250ms delay, nano would probably lag when typing fast or 
pasting.

In a normal file, of a few thousand lines, the lag is not noticeable.  But yes,
in huge files, with more than a hundred thousand lines, incremental search
becomes unusable, because it lags and there is no feedback -- the normal search
will display "[ Searching... ]" when searching takes more than half a second.

(Pasting with the keyboard (^U) does not cause a series of searches because
it is a single keystroke, but pasting with the mouse would cause such a series
-- at least, until bracketed paste mode is implemented.)

Benno



reply via email to

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