Re: [PATCH v2] scripts: kconfig: nconf: Add search jump feature

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

 



On Tue, Jul 25, 2023 at 11:46 PM Jesse Taube <mr.bossman075@xxxxxxxxx> wrote:
>
> Menuconfig has a feature where you can "press the key in the (#) prefix
> to jump directly to that location. You will be returned to the current
> search results after exiting this new menu."
>
> This commit adds this feature to nconfig, with almost identical code.
>
> Signed-off-by: Jesse Taube <Mr.Bossman075@xxxxxxxxx>
> ---
> v1->v2:
>  Add selected_conf to go to menu and select a specific option.
>  Use get_line insead of creating new function.
>  Use Masahiro Yamada's new jump search implementation.
> ---


Looks almost good to me.
Just a few nits.


>
>  static void search_conf(void)
>  {
> @@ -693,6 +750,7 @@ static void search_conf(void)
>         struct gstr title;
>         char *dialog_input;
>         int dres;
> +       bool again = false;


I think the initializer '= false' is unneeded.




> +
> +/* layman's scrollable window... */
> +int show_scroll_win_ext(WINDOW *main_window, const char *title, char *text,
> +                       extra_key_cb_fn extra_key_cb, void *data)
>  {
>         int res;
>         int total_lines = get_line_no(text);
>         int x, y, lines, columns;
>         int start_x = 0, start_y = 0;
>         int text_lines = 0, text_cols = 0;
> +       int start, end;


Maybe these should be size_t for consistency
with the prototype of handle_search_keys().
(and that is what you pointed out before)





-- 
Best Regards
Masahiro Yamada




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

  Powered by Linux