diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-06 03:56:45 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-06 03:56:45 +0100 |
commit | cae41c18ff33f0dc1179fda611fb46c21b5fc6e3 (patch) | |
tree | c435c706be964f20454fb0c82feba398c28f68c5 /sys/src/libframe | |
parent | e3b49509662cc1da997db4113b743d477a9e1ac0 (diff) |
libframe: avoid _frcanfit() call in frdelete()
no need to calculate number of runes to fit in
box when box contains no runes.
Diffstat (limited to 'sys/src/libframe')
-rw-r--r-- | sys/src/libframe/frdelete.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/libframe/frdelete.c b/sys/src/libframe/frdelete.c index c8c9b6b3b..414df1aa5 100644 --- a/sys/src/libframe/frdelete.c +++ b/sys/src/libframe/frdelete.c @@ -46,13 +46,13 @@ frdelete(Frame *f, ulong p0, ulong p1) while(pt1.x!=pt0.x && n1<f->nbox){ _frcklinewrap0(f, &pt0, b); _frcklinewrap(f, &pt1, b); - n = _frcanfit(f, pt0, b); - if(n==0) - drawerror(f->display, "_frcanfit==0"); r.min = pt0; r.max = pt0; r.max.y += f->font->height; if(b->nrune > 0){ + n = _frcanfit(f, pt0, b); + if(n==0) + drawerror(f->display, "_frcanfit==0"); if(n != b->nrune){ _frsplitbox(f, n1, n); b = &f->box[n1]; |