* [9fans] acme line wrap bug
@ 2010-02-11 19:16 erik quanstrom
2010-02-12 16:48 ` Russ Cox
0 siblings, 1 reply; 4+ messages in thread
From: erik quanstrom @ 2010-02-11 19:16 UTC (permalink / raw)
To: 9fans
acme doesn't always clear the right margin to compensate for
the different amount of right-margin slop due to different
character widths. in this case ">" is very wide and won't fit
in the space that "n" did. so the n is mistakenly shown where
it shouldn't be.
between the two pngs, the text "has gone" was cut.
hget http://www.quanstro.net/plan9/acmebug/w0.png|png
hget http://www.quanstro.net/plan9/acmebug/w1.png|png
- erik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] acme line wrap bug
2010-02-11 19:16 [9fans] acme line wrap bug erik quanstrom
@ 2010-02-12 16:48 ` Russ Cox
2010-02-12 16:57 ` erik quanstrom
2010-03-04 15:59 ` erik quanstrom
0 siblings, 2 replies; 4+ messages in thread
From: Russ Cox @ 2010-02-12 16:48 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
> acme doesn't always clear the right margin to compensate for
> the different amount of right-margin slop due to different
> character widths. in this case ">" is very wide and won't fit
> in the space that "n" did. so the n is mistakenly shown where
> it shouldn't be.
>
> between the two pngs, the text "has gone" was cut.
long time bug. patch?
russ
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] acme line wrap bug
2010-02-12 16:48 ` Russ Cox
@ 2010-02-12 16:57 ` erik quanstrom
2010-03-04 15:59 ` erik quanstrom
1 sibling, 0 replies; 4+ messages in thread
From: erik quanstrom @ 2010-02-12 16:57 UTC (permalink / raw)
To: 9fans
> > between the two pngs, the text "has gone" was cut.
>
> long time bug. patch?
yes it is. i haven't had time yet.
- erik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] acme line wrap bug
2010-02-12 16:48 ` Russ Cox
2010-02-12 16:57 ` erik quanstrom
@ 2010-03-04 15:59 ` erik quanstrom
1 sibling, 0 replies; 4+ messages in thread
From: erik quanstrom @ 2010-03-04 15:59 UTC (permalink / raw)
To: 9fans
On Fri Feb 12 11:49:37 EST 2010, rsc@swtch.com wrote:
> > acme doesn't always clear the right margin to compensate for
> > the different amount of right-margin slop due to different
> > character widths. in this case ">" is very wide and won't fit
> > in the space that "n" did. so the n is mistakenly shown where
> > it shouldn't be.
> >
> > between the two pngs, the text "has gone" was cut.
>
> long time bug. patch?
this has been effective for me:
; diff -c /n/dump/2010/0212/sys/src/libframe/frdelete.c frdelete.c
/n/dump/2010/0212/sys/src/libframe/frdelete.c:10,16 - frdelete.c:10,16
{
Point pt0, pt1, ppt0;
Frbox *b;
- int n0, n1, n;
+ int n0, n1, n, w0;
ulong cn1;
Rectangle r;
int nn0;
/n/dump/2010/0212/sys/src/libframe/frdelete.c:53,58 - frdelete.c:53,59
r.max = pt0;
r.max.y += f->font->height;
if(b->nrune > 0){
+ w0 = b->wid;
if(n != b->nrune){
_frsplitbox(f, n1, n);
b = &f->box[n1];
/n/dump/2010/0212/sys/src/libframe/frdelete.c:60,65 - frdelete.c:61,74
r.max.x += b->wid;
draw(f->b, r, f->b, nil, pt1);
cn1 += b->nrune;
+
+ /* blank remainder of line */
+ r.min.x = r.max.x;
+ r.max.x += w0 - b->wid;
+ if(r.max.x > f->r.max.x)
+ r.max.x = f->r.max.x;
+ if(r.max.x != r.min.x)
+ draw(f->b, r, f->cols[BACK], nil, r.min);
}else{
r.max.x += _frnewwid0(f, pt0, b);
if(r.max.x > f->r.max.x)
- erik
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-04 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11 19:16 [9fans] acme line wrap bug erik quanstrom
2010-02-12 16:48 ` Russ Cox
2010-02-12 16:57 ` erik quanstrom
2010-03-04 15:59 ` erik quanstrom
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).