* [PATCH] menuconfig: Search from everywhere
@ 2015-02-09 13:12 Alexander Kuleshov
2015-02-11 17:29 ` Paul Bolle
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kuleshov @ 2015-02-09 13:12 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: linux-kernel, linux-kbuild, Alexander Kuleshov
If we want to see search window again, for example after typo
or for another search, we need to press on '< Exit >' and than
execute new search. Let's make '/' active everywhere.
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
scripts/kconfig/lxdialog/textbox.c | 4 ++++
scripts/kconfig/mconf.c | 8 ++++++++
2 files changed, 12 insertions(+)
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
index 1773319..958770d 100644
--- a/scripts/kconfig/lxdialog/textbox.c
+++ b/scripts/kconfig/lxdialog/textbox.c
@@ -141,6 +141,10 @@ do_resize:
while (!done) {
key = wgetch(dialog);
switch (key) {
+ case '/':
+ key = 9;
+ done = true;
+ break;
case 'E': /* Exit */
case 'e':
case 'X':
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 4dd3755..d49fa45 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -446,7 +446,15 @@ again:
str_get(&res), 0, 0, keys, &vscroll,
&hscroll, &update_text, (void *)
&data);
+ if (dres == 9) {
+ free(sym_arr);
+ str_free(&title);
+ list_del(trail.prev);
+ str_free(&sttext);
+ search_conf();
+ return;
+ }
+
again = false;
for (i = 0; i < JUMP_NB && keys[i]; i++)
if (dres == keys[i]) {
--
2.3.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] menuconfig: Search from everywhere
2015-02-09 13:12 [PATCH] menuconfig: Search from everywhere Alexander Kuleshov
@ 2015-02-11 17:29 ` Paul Bolle
0 siblings, 0 replies; 2+ messages in thread
From: Paul Bolle @ 2015-02-11 17:29 UTC (permalink / raw)
To: Alexander Kuleshov; +Cc: linux-kernel, linux-kbuild
[Removed Yann. Web searches should explain why.]
On Mon, 2015-02-09 at 19:12 +0600, Alexander Kuleshov wrote:
> If we want to see search window again, for example after typo
> or for another search, we need to press on '< Exit >' and than
then
> execute new search. Let's make '/' active everywhere.
Everywhere or just in the "Search Results" screen itself?
A drawback of menuconfig is its stacked interface. Each search and jump
pushes two screens to its stack of screens. I'm often surprised at the
number of screens I generated by searching around a bit. Does searching
from withing search results again push another screen onto the stack?
Anyhow, if hitting enter and "/" bothers you a redesign of the search
functionality would be a better idea. Eg, make it have a input area on
top (to type in the query) and an text area below it (to display
results). Which is probably not worth the, presumably rather big,
effort.
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
> scripts/kconfig/lxdialog/textbox.c | 4 ++++
> scripts/kconfig/mconf.c | 8 ++++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
> index 1773319..958770d 100644
> --- a/scripts/kconfig/lxdialog/textbox.c
> +++ b/scripts/kconfig/lxdialog/textbox.c
> @@ -141,6 +141,10 @@ do_resize:
> while (!done) {
> key = wgetch(dialog);
> switch (key) {
> + case '/':
> + key = 9;
> + done = true;
> + break;
> case 'E': /* Exit */
> case 'e':
> case 'X':
> diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
> index 4dd3755..d49fa45 100644
> --- a/scripts/kconfig/mconf.c
> +++ b/scripts/kconfig/mconf.c
> @@ -446,7 +446,15 @@ again:
> str_get(&res), 0, 0, keys, &vscroll,
> &hscroll, &update_text, (void *)
> &data);
> + if (dres == 9) {
> + free(sym_arr);
> + str_free(&title);
> + list_del(trail.prev);
> + str_free(&sttext);
> + search_conf();
> + return;
> + }
> +
> again = false;
> for (i = 0; i < JUMP_NB && keys[i]; i++)
> if (dres == keys[i]) {
Thanks,
Paul Bolle
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-11 17:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 13:12 [PATCH] menuconfig: Search from everywhere Alexander Kuleshov
2015-02-11 17:29 ` Paul Bolle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).