libframe: avoid _frcanfit() call in frdelete()

no need to calculate number of runes to fit in
box when box contains no runes.
front
cinap_lenrek 2014-01-06 03:56:45 +01:00
parent e3b4950966
commit cae41c18ff
1 changed files with 3 additions and 3 deletions

View File

@ -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];