9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] acme hides top windows after loading a dump file
@ 2022-03-15  5:07 Xiao-Yong Jin
  2022-03-15  8:34 ` igor
  0 siblings, 1 reply; 3+ messages in thread
From: Xiao-Yong Jin @ 2022-03-15  5:07 UTC (permalink / raw)
  To: 9front

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-16  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15  5:07 [9front] acme hides top windows after loading a dump file Xiao-Yong Jin
2022-03-15  8:34 ` igor
2022-03-16  2:53   ` Xiao-Yong Jin

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