Re: [RFC v8 1/1] mconf: global i-search in menu prompts

From: Dirk Gouders
Date: Wed Jun 20 2018 - 15:02:37 EST


Randy Dunlap <rdunlap@xxxxxxxxxxxxx> writes:

> Hi,
>
> On 06/20/2018 01:42 AM, Dirk Gouders wrote:
>>
>> Operation
>> ---------
>> The TAB key is reserved to toggle the focus between menu and bottons.
>> Focus is on the buttons if one of the buttens (the active one) is
>> hightlighted, otherwise it is on the menu.
>>
>> When the focus is on the buttons, mconf operates as before with the
>> exception of the TAB key.
>>
>> When the focus is on the menu, mconf operates in i-search mode and the
>> following input has special meaning:
>>
>> * <\> (backslash) can be used to search for other occurences of an
>> already entered string. On empty search strings, nothing happens.
>>
>> * Any other printable character than backslash and '\n' is appended to
>> the current search string and a match is searched for. If a match
>> is found, it is immediately navigated to.
>
> About that paragraph above: I tried to search for "fs-cache", as in:
>
> config FSCACHE_DEBUG
> bool "Debug FS-Cache"
>
> but i-search does not allow me to enter a '-' character. Seems odd to me.

Hi Randy,

thanks for all your testing.

'-' and '+' previously had the same meaning as <KEY_UP>, <KEY_DOWN>,
respectively. If you are on the top menu item and press '-' there is
nothing to scroll up so it appears as if the pressed key wasn't
processed.

I-search should add those characters to the pattern but I broke that two
or three versions before when I fixed another issue.

I will add this to my list of test cases so this won't happen again.

Dirk


> Still doing other testing...
>
>
>> * BACKSPACE is used to remove the last character of the search string.
>>
>> * DEL clears the search string.
>>
>> * ENTER can be used to enter a submenu.
>>
>> * ESC ESC exits the current isearch and clears the search string.
>>
>> * Horizontal arrow keys still cycle between the buttons but also
>> switch focus to the buttons.
>>
>> * Vertical arroy keys navigate the menu items.
>>
>> At any time, at most one i-search is active and the navigation path to
>> the current menu is displayed in the subtitle, the second line in the
>> menu window.
>>
>> Navigation example:
>>
>> To navigate to options concerning NFS file systems, simply type 'n',
>> 'f' and 's'.
>>
>> Hint: use the 'z' key with focus on buttons to search for invisible
>> prompts.