From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] [gdb/tui] Allow command window of 1 or 2 lines
Date: Mon, 13 Nov 2023 21:20:47 +0100 [thread overview]
Message-ID: <3ef909aa-99d2-4f0b-be22-be09c40978f8@suse.de> (raw)
In-Reply-To: <87r0ktsggf.fsf@tromey.com>
On 11/13/23 18:36, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> + /* Compute the minimum height of this window. */
> Tom> + virtual int min_height () const override
> Tom> + {
> Tom> + int preferred_min = tui_win_info::min_height ();
> Tom> + int max = max_height ();
> Tom> + /* If there is enough space to accommodate the preferred minimum height,
> Tom> + use it. Otherwise, use as much as possible. */
> Tom> + return (preferred_min <= max
> Tom> + ? preferred_min
> Tom> + : max);
>
> I read this and was wondering if this will make the command window
> ignore the weight given to it in the layout.
The current minimum height of the command window is
tui_win_info::min_height () == 3.
A weight can only make the size larger, not smaller than the minimum size.
This patch only has effect for the case that the terminal size is
smaller than 3, so my understanding is that weight in this case is
likewise inconsequential.
Thanks,
- Tom
prev parent reply other threads:[~2023-11-13 20:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 12:04 Tom de Vries
2023-11-09 12:04 ` [PATCH 2/2] [gdb/tui] Fix resizing of terminal to " Tom de Vries
2023-11-13 17:36 ` [PATCH 1/2] [gdb/tui] Allow command window of " Tom Tromey
2023-11-13 20:20 ` Tom de Vries [this message]
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=3ef909aa-99d2-4f0b-be22-be09c40978f8@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).