linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: masahiroy@kernel.org, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] menuconfig: reclaim horizontal space
Date: Mon, 13 Mar 2023 22:27:01 +0300	[thread overview]
Message-ID: <1f228646-0cce-4183-a4cc-6982b69e887d@p183> (raw)
In-Reply-To: <26a291d8-49c0-e5af-846b-1e29f8266ba9@infradead.org>

On Sun, Mar 12, 2023 at 05:29:24PM -0700, Randy Dunlap wrote:
> On 3/11/23 03:42, Alexey Dobriyan wrote:
> > Draw the menu box from position (0, 2) so that there is less unused
> > space available. Horizontal is not _really_ important but on small
> > terminals maybe it is.
> 
> ISTM that the first sentence goes with patch 3/3. ??
> 
> > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> > ---
> >  scripts/kconfig/lxdialog/menubox.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
> > index 5c3addad89b0..5eb67c04821f 100644
> > --- a/scripts/kconfig/lxdialog/menubox.c
> > +++ b/scripts/kconfig/lxdialog/menubox.c
> > @@ -184,7 +184,6 @@ int dialog_menu(const char *title, const char *prompt,
> >  		return -ERRDISPLAYTOOSMALL;
> >  
> >  	height -= 4;
> > -	width  -= 5;
> 
> How does this work?  In my test patch, I changed 5 to 4 to recover/reclaim the
> shadow line.  To my surprise, I don't see any negative issue with this change,
> but I am perplexed by it.

Ehh? It is calculated as (getmaxx - width) / 2, so both 5 or 4 do
the same thing.

> Anyway, it worked in my testing.
> 
> Tested-by: Randy Dunlap <rdunlap@infradead.org>
> 
> >  	menu_height = height - 10;
> >  
> >  	max_choice = MIN(menu_height, item_count());
> 
> Thanks.
> -- 
> ~Randy

  reply	other threads:[~2023-03-13 19:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11 11:42 [PATCH 1/3] menuconfig: delete shadows, prepare for vertical space reclaim Alexey Dobriyan
2023-03-11 11:42 ` [PATCH 2/3] menuconfig: reclaim horizontal space Alexey Dobriyan
2023-03-13  0:29   ` Randy Dunlap
2023-03-13 19:27     ` Alexey Dobriyan [this message]
2023-03-11 11:42 ` [PATCH 3/3] menuconfig: reclaim vertical space Alexey Dobriyan
2023-03-13  0:29   ` Randy Dunlap
2023-03-21  6:02   ` Masahiro Yamada
2023-03-13  0:29 ` [PATCH 1/3] menuconfig: delete shadows, prepare for vertical space reclaim Randy Dunlap
2023-03-21  5:35 ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f228646-0cce-4183-a4cc-6982b69e887d@p183 \
    --to=adobriyan@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).