9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Xiao-Yong Jin <meta.jxy@gmail.com>
To: 9front@9front.org
Subject: Re: [9front] acme hides top windows after loading a dump file
Date: Tue, 15 Mar 2022 21:53:28 -0500	[thread overview]
Message-ID: <60D85905-956E-4E6C-8064-569FA4D53BB5@gmail.com> (raw)
In-Reply-To: <36B9278E3AE1F076829A180A50B0B401@9lab.org>

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


      reply	other threads:[~2022-03-16  9:08 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
2022-03-16  2:53   ` Xiao-Yong Jin [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=60D85905-956E-4E6C-8064-569FA4D53BB5@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).