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

* Re: [9front] acme hides top windows after loading a dump file
  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
  0 siblings, 1 reply; 3+ messages in thread
From: igor @ 2022-03-15  8:34 UTC (permalink / raw)
  To: 9front; +Cc: igor

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


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

* Re: [9front] acme hides top windows after loading a dump file
  2022-03-15  8:34 ` igor
@ 2022-03-16  2:53   ` Xiao-Yong Jin
  0 siblings, 0 replies; 3+ messages in thread
From: Xiao-Yong Jin @ 2022-03-16  2:53 UTC (permalink / raw)
  To: 9front

Thanks.  There is still one issue with loading the dump file.
After two or more windows are dumped together, when loading
the dump file, all the windows apart from the top one move
up one line.  Effectively the topmost window got shrunk one
line, and the bottommost window got expanded one line.

> On Mar 15, 2022, at 3:34 AM, igor@9lab.org wrote:
> 
> 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)){
>> 
> 


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