[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] Future of incremental search
From: |
Brand Huntsman |
Subject: |
Re: [Nano-devel] Future of incremental search |
Date: |
Fri, 16 Feb 2018 17:49:44 -0700 |
On Fri, 16 Feb 2018 10:30:26 -0200
Marco Diego Aurélio Mesquita <address@hidden> wrote:
> with incremental search, a few keystrokes is all I need
There are so many cases where only a few characters are needed to find
something, but normal search requires typing the entire word or opening the
prompt again to enter more characters.
It would be nice if the "[Incremental]" could be hidden from the prompt if
always enabled in nanorc. And in that case, if M-I is used to turn off
inc-search, then display "[Non-Incremental]" or something. If done right
(behaves just like normal search), I see no reason why it shouldn't always be
enabled and not have the option to enable or disable it.
> It looks like the problems pointed in [2] are easy to fix, except the
> triple click one.
^K^U that line and then ^U in the prompt works, the linefeed is ignored so the
prompt doesn't close. But pasting interprets the linefeed different some how
and closes the prompt
Put this after the declarations in search_text():
fprintf(stderr, "%d [%s]\n", modus, needle);
Run `src/nano NEWS 2>TRAIL;cat TRAIL` for the following cases:
^W M-I ^C quit
1 []
3 []
2 []
^END up-arrow ^K^U ^HOME ^W M-I ^U quit
1 []
3 []
3 [ jazz.]
2 [ jazz.]
^END, triple-click the "jazz" line, ^HOME ^W M-I, paste and quit. There
are 18 characters in that line, excluding the linefeed and 18 empty
calls to seearch_text() with modus=SEARCH_FROM_START, excluding the 1
empty call that always happens when the prompt is opened. And
modus=RESTORE_POSITION never happens.
Now double-click the word "jazz" and paste into incremental search. Why are
there 5 empty calls with SEARCH_FROM_START?
1 []
3 []
3 []
3 []
3 []
3 []
3 [jazz.]
2 [jazz.]
Hopefully that helps you find the problem.
> My current plan is to wait until the "errcolor"
> lands, fix the problems in [2] and send another iteration of the
> patch.
I see no reason to wait for errorcolor, it will only improve non-match
recognition for those with color. Unhighlighting the last match and displaying
"[NOT FOUND]" in the prompt should be enough for now.
> /* Repostion the cursor */
Missing an 'i'.
- [Nano-devel] Future of incremental search, Marco Diego Aurélio Mesquita, 2018/02/15
- Re: [Nano-devel] Future of incremental search, Benno Schulenberg, 2018/02/16
- Re: [Nano-devel] Future of incremental search, Marco Diego Aurélio Mesquita, 2018/02/16
- Re: [Nano-devel] Future of incremental search,
Brand Huntsman <=
- Re: [Nano-devel] Future of incremental search, Marco Diego Aurélio Mesquita, 2018/02/17
- Re: [Nano-devel] Future of incremental search, Brand Huntsman, 2018/02/18
- Re: [Nano-devel] Future of incremental search, Marco Diego Aurélio Mesquita, 2018/02/18
- Re: [Nano-devel] Future of incremental search, Brand Huntsman, 2018/02/20
- Message not available
- [Nano-devel] Fwd: Future of incremental search, Marco Diego Aurélio Mesquita, 2018/02/23
- Re: [Nano-devel] Fwd: Future of incremental search, Brand Huntsman, 2018/02/27
- Re: [Nano-devel] Future of incremental search, Benno Schulenberg, 2018/02/18
- Re: [Nano-devel] Future of incremental search, Brand Huntsman, 2018/02/18
- Re: [Nano-devel] Future of incremental search, Benno Schulenberg, 2018/02/18
- Re: [Nano-devel] Future of incremental search, Marco Diego Aurélio Mesquita, 2018/02/18