Re: [PATCH] nconf: respect i-search search pattern boundaries

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

 



Randy Dunlap <rdunlap@xxxxxxxxxxxxx> writes:

> On 06/12/2018 05:04 AM, Dirk Gouders wrote:
>> This patch adds boundary checks for nconf's i-search pattern.
>> 
>> Further, the pattern buffer is always bzero'ed when '/' is
>> pressed, so the second line in the code below was not needed (and
>> otherwise wouldn't have worked as expected):
>> 
>> 	state->pattern[strlen(state->pattern)] = c;
>> 	state->pattern[strlen(state->pattern)] = '\0';
>> 
>> Finally, the pattern length was reduced to a length that still
>> seems sufficient but will not fill more than the top line of the
>> screen, thus eliminating special treatment needs on resizes or normal
>> exit of i-search.
>> 
>> Signed-off-by: Dirk Gouders
>
> S-O-B: line should also have your email address after your name.
>
>> ---
>>  scripts/kconfig/nconf.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> Your patch descsription makes sense.  I tested nconf (make nconfig)
> both with and without this patch.  I didn't like the /search results
> in either case.  F1 (Help) says:
>
>  ││ Start incremental, case-insensitive search for STRING in menu entries,   ││
>  ││     no regex support, STRING is displayed in upper left corner           ││
>  ││                             </>STRING                                    ││
>  ││     Remove last character   <Backspace>                                  ││
>  ││     Jump to next hit        <Down>                                       ││
>  ││     Jump to previous hit    <Up>                                         ││
>  ││ Exit menu search mode       </>  <Esc>
>
> but I couldn't get <Down> == "Jump to next hit" to work for me at all
> (with or without the patch).

Thank you for testing and commenting on the patch.  I will correct the
S-O-B line and also remove one "search" from the subject.

The navigation through matches works here, did use the up/down arrow
keys?  Because of your comment, I also tested page-up/page-down and
noticed that those keys add 'S', 'R' to the search pattern,
respectively...

Dirk
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux