Message ID | 20230311114248.36587-2-adobriyan@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp246350wrd; Sat, 11 Mar 2023 04:00:50 -0800 (PST) X-Google-Smtp-Source: AK7set93z0o0HJBjSoBYB9EhncWTJMLC+ZfpSFPoKcMV+KDdaZFSesVsKK9bnZiRMv27viGT/MHy X-Received: by 2002:a62:844e:0:b0:5a8:aabf:46f4 with SMTP id k75-20020a62844e000000b005a8aabf46f4mr26221801pfd.8.1678536050294; Sat, 11 Mar 2023 04:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678536050; cv=none; d=google.com; s=arc-20160816; b=EtwSNUVnlQW0Q44zzH/G7qs8V+ZbNr6qWPk0wvCU8+R8UsX3U3eXY/stgz7J8LVilD jdqEnJuwcKelhEtHmBnYzoaTrgqajkWHbWOPBUZYLlu/PURo8s6iEGHPzG570SIrA9tS st9RrLR5h8zn40zvj4Co0j17/Qq+cGkMZyelOb0lDScRFCVQdB6aJQWxWSEuIiVGZwxL hsCde3Qyon54GAk0ctNC3u7JV6na4f996jcgsS2jQ5kL9zWD10a6UyW36NgFm9E6hnmG kjO3Df78OhCS+PLcrBHKAmaKj6OwRTmRoIE/CuTS6X/u4gSKVKVQ2WC0wjcQxwkDSh+r EboA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mULnghyNJnZxFvPP0TSkUJByh26mvIxUqvGvaqhURFQ=; b=SpbBuH5wYZOj68wOWfLeCxpSqj9qIY9kgEFJj/Xl5x5q0BEzyYcRgT9ocYrHpqqwuc Lcz/nJvrVstx65DayyNguik1rIC3sLQ9bc3mbVeLK5N2U/H2ZsrP9IBdhEuWhRxy4fkn hZTPf+4eI6vjOG9dE2qZ0zsMo59nAW89DjaFxox2GlDP80bPbd5vlg3aXBNyBGJI9K+8 bn2Lj+H3Ca6HZfb1WKGOSx/QMmh+kDQNPTmsIbLfDz3f1Ub4625B+n6ncUb77ld5RsbO +N/2ODEgyov8Jxz/T6gI6S3ICWn3KLyoiqvgX3XrTT8JGVMhCeIMbmMOJ5wWAOhtV7q8 lASw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oYcx3S26; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a635105000000b004ff90ee4fd4si1976879pgb.847.2023.03.11.04.00.35; Sat, 11 Mar 2023 04:00:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oYcx3S26; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbjCKLnU (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Sat, 11 Mar 2023 06:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbjCKLnM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 11 Mar 2023 06:43:12 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D0F6196BD; Sat, 11 Mar 2023 03:43:08 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id g10so2019686eda.1; Sat, 11 Mar 2023 03:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678534986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mULnghyNJnZxFvPP0TSkUJByh26mvIxUqvGvaqhURFQ=; b=oYcx3S26706sIf8axRV0CrFa84wmfoCEyo1MVNSnnDvjGLVUv0T/AGMLEUe8auA6gd hJl2jADYXKEsuyOTMickvqEGOSO0XV0M+4vpUjoXOiwQI03QpjCFwEXDEea4LVdjoc8i 5PdWzNPb3wzkKP9FFCngLJoObd26QiHhEhdKBJKw53bq6dbu/PnBlK+TCeG3M1EaeTm6 VQfgAqULY9xTgLuL82u1z22IB78ukMxQ+a+Zy3JQSd9ngueDDBnOlEWV95Y4nP0ykou8 Y6WTBoiS2MyMlfsBdx/7upguet5SkSEVcGNRCVjVUurR7RZeBkO6+v1isAa8WZPLZK7I dWIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678534986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mULnghyNJnZxFvPP0TSkUJByh26mvIxUqvGvaqhURFQ=; b=3pj0vZQrOeqV88lfGZZhzCkZAxNm3dE0UJqrkIqyoZpIogHnX2NzdJfan2LAV7/8qP nIc/o/OBd7WrhzPjNe23ySmRMNYGsO4hFEuFtS6/Nv94c8JwcvDTpdszuJY3++bpxTTZ NcVwOWRfLPzRh8F/WrkXlnO4yncDv+6iAr9UFD6KRR/wU+Xl6Cj4rP2b6tC9NICS+sZj bJLQ8JZozGS9K2X2rr/FDwvq+r/EH61A7hi0Za2tUpPsI1eGwUNUAISATgxcK1ZJWWvT FoIAfIsY813yM/8NjWHA+ACHA3Hcw3Y9vNoU6b4uun3HXQhwC3gDgMeRYdh3TPwClpBU xWkA== X-Gm-Message-State: AO0yUKVz639oRRoJktTbsnniZ7/LicqnlUz/hBe2hZX6heXJmIvG77gZ WcfL4YH2Hyc66z5PNeA47w== X-Received: by 2002:a05:6402:716:b0:4ab:554:37ea with SMTP id w22-20020a056402071600b004ab055437eamr26223736edx.4.1678534986609; Sat, 11 Mar 2023 03:43:06 -0800 (PST) Received: from localhost.localdomain ([46.53.248.97]) by smtp.gmail.com with ESMTPSA id x101-20020a50baee000000b004aeeb476c5bsm1088440ede.24.2023.03.11.03.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 03:43:06 -0800 (PST) From: Alexey Dobriyan <adobriyan@gmail.com> To: masahiroy@kernel.org Cc: adobriyan@gmail.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] menuconfig: reclaim horizontal space Date: Sat, 11 Mar 2023 14:42:47 +0300 Message-Id: <20230311114248.36587-2-adobriyan@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230311114248.36587-1-adobriyan@gmail.com> References: <20230311114248.36587-1-adobriyan@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760072617425911891?= X-GMAIL-MSGID: =?utf-8?q?1760072617425911891?= |
Series |
[1/3] menuconfig: delete shadows, prepare for vertical space reclaim
|
|
Commit Message
Alexey Dobriyan
March 11, 2023, 11:42 a.m. UTC
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.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
scripts/kconfig/lxdialog/menubox.c | 1 -
1 file changed, 1 deletion(-)
Comments
Hi, 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. 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.
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
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; menu_height = height - 10; max_choice = MIN(menu_height, item_count());