9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Xiao-Yong Jin <meta.jxy@gmail.com>
To: 9front@9front.org
Subject: [9front] acme hides top windows after loading a dump file
Date: Tue, 15 Mar 2022 00:07:25 -0500	[thread overview]
Message-ID: <F7001DE6-2C7C-417F-9E66-F0CE26B2D94E@gmail.com> (raw)

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)){


             reply	other threads:[~2022-03-15  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15  5:07 Xiao-Yong Jin [this message]
2022-03-15  8:34 ` igor
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=F7001DE6-2C7C-417F-9E66-F0CE26B2D94E@gmail.com \
    --to=meta.jxy@gmail.com \
    --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).