From: igor@9lab.org
To: 9front@9front.org
Cc: igor@9lab.org
Subject: Re: [9front] acme hides top windows after loading a dump file
Date: Tue, 15 Mar 2022 09:34:22 +0100 [thread overview]
Message-ID: <36B9278E3AE1F076829A180A50B0B401@9lab.org> (raw)
In-Reply-To: <F7001DE6-2C7C-417F-9E66-F0CE26B2D94E@gmail.com>
To reliably reproduce the behaviour the window that acme is started in
requires a certain size:
% window -dx 913 -dy 606 'acme -l /tmp/test.dump'
Tested the fix; will push it later today.
Thanks for the report and the patch!
Quoth Xiao-Yong Jin <meta.jxy@gmail.com>:
> When loading a dump file contains a window with an only tag line, acme hides that window.
> Here is a simple dump file reproduces this issue.
>
> #### dump file begins ####
> /tmp
> /lib/font/bit/pelm/unicode.8.font
> /lib/font/bit/pelm/unicode.8.font
> 0
> f 0 5 175 175 1
> 5 40 175 1 0 /sys/src/cmd/acme/ Del Snarf Get | Look
> f 0 4 330 330 3
> 4 27 330 1 0 /tmp/ Del Snarf Get | Look
> #### dump file ends ####
>
> This issue is introduced in commit 47b7dc5ccd77bc247ab15cfab3a7a8f955771c70
>
> Reinstate two lines as the patch below fix the issue.
>
> diff ca313087c1715a0331a58c01ad104632d366f057 uncommitted
> --- a/sys/src/cmd/acme/wind.c
> +++ b/sys/src/cmd/acme/wind.c
> @@ -188,6 +188,8 @@
> w->taglines = wintaglines(w, r);
> r1.max.y = min(r.max.y, r1.min.y + w->taglines*font->height);
> }
> + if(Dy(r1) < font->height)
> + r1.max.y = r1.min.y+font->height;
> /* If needed, resize & redraw tag. */
> y = r1.max.y;
> if(!safe || !w->tagsafe || !eqrect(w->tag.r, r1)){
>
next prev parent reply other threads:[~2022-03-15 9:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 5:07 Xiao-Yong Jin
2022-03-15 8:34 ` igor [this message]
2022-03-16 2:53 ` Xiao-Yong Jin
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=36B9278E3AE1F076829A180A50B0B401@9lab.org \
--to=igor@9lab.org \
--cc=9front@9front.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).