[2/2] menuconfig: reclaim 1 more vertical line

Message ID 8a8c8ed8-f322-4024-9433-3a9cb524484e@p183
State New
Headers
Series [1/2] menuconfig: delete shadows, reclaim vertical space |

Commit Message

Alexey Dobriyan March 4, 2023, 4:56 p.m. UTC
  Empty line after legend is waste, use it for config options.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 scripts/kconfig/lxdialog/menubox.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Randy Dunlap March 4, 2023, 5:52 p.m. UTC | #1
Hi,

On 3/4/23 08:56, Alexey Dobriyan wrote:
> Empty line after legend is waste, use it for config options.
> 

I don't see an empty line after the legend. For me this patch
truncates the menu_instructions[] text from 4 lines to 3 lines,
dropping good/useful help text.

menu_instructions[] was already truncated before this patch
(in an 80x30 size terminal window).

What size terminal are you using?

> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  scripts/kconfig/lxdialog/menubox.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/scripts/kconfig/lxdialog/menubox.c
> +++ b/scripts/kconfig/lxdialog/menubox.c
> @@ -185,7 +185,7 @@ int dialog_menu(const char *title, const char *prompt,
>  
>  	height -= 2;
>  	width  -= 5;
> -	menu_height = height - 10;
> +	menu_height = height - 9;
>  
>  	max_choice = MIN(menu_height, item_count());
>
  
Alexey Dobriyan March 4, 2023, 6:53 p.m. UTC | #2
On Sat, Mar 04, 2023 at 09:52:55AM -0800, Randy Dunlap wrote:
> Hi,
> 
> On 3/4/23 08:56, Alexey Dobriyan wrote:
> > Empty line after legend is waste, use it for config options.
> > 
> 
> I don't see an empty line after the legend. For me this patch
> truncates the menu_instructions[] text from 4 lines to 3 lines,
> dropping good/useful help text.

OK, I do need to test this one on more screen sizes.

> menu_instructions[] was already truncated before this patch
> (in an 80x30 size terminal window).
> 
> What size terminal are you using?

135 x 31

> > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> > ---
> > 
> >  scripts/kconfig/lxdialog/menubox.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/scripts/kconfig/lxdialog/menubox.c
> > +++ b/scripts/kconfig/lxdialog/menubox.c
> > @@ -185,7 +185,7 @@ int dialog_menu(const char *title, const char *prompt,
> >  
> >  	height -= 2;
> >  	width  -= 5;
> > -	menu_height = height - 10;
> > +	menu_height = height - 9;
> >  
> >  	max_choice = MIN(menu_height, item_count());
> >  
> 
> -- 
> ~Randy
  

Patch

--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -185,7 +185,7 @@  int dialog_menu(const char *title, const char *prompt,
 
 	height -= 2;
 	width  -= 5;
-	menu_height = height - 10;
+	menu_height = height - 9;
 
 	max_choice = MIN(menu_height, item_count());