This commit is contained in:
Russ Cox 2007-11-27 15:39:06 -05:00
commit 83ab7d8896
21 changed files with 239 additions and 107 deletions

View file

@ -534,11 +534,12 @@ colwhich(Column *c, Point p)
for(i=0; i<c->nw; i++){
w = c->w[i];
if(ptinrect(p, w->r)){
if(ptinrect(p, w->tagtop) || ptinrect(p, w->tag.fr.r))
if(ptinrect(p, w->tagtop) || ptinrect(p, w->tag.all))
return &w->tag;
if(ptinrect(p, w->body.scrollr) || ptinrect(p, w->body.fr.r))
return &w->body;
return nil;
/* exclude partial line at bottom */
if(p.x >= w->body.scrollr.max.x && p.y >= w->body.fr.r.max.y)
return nil;
return &w->body;
}
}
return nil;

View file

@ -365,11 +365,11 @@ search(Text *ct, Rune *r, uint n)
fbuffree(s);
return TRUE;
}
if(around && q>=ct->q1)
break;
--nb;
b++;
q++;
if(around && q>=ct->q1)
break;
}
fbuffree(s);
return FALSE;