diff options
Diffstat (limited to 'src/cmd/acme')
-rw-r--r-- | src/cmd/acme/cols.c | 9 | ||||
-rw-r--r-- | src/cmd/acme/look.c | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c index 3ac780b1..31b2780f 100644 --- a/src/cmd/acme/cols.c +++ b/src/cmd/acme/cols.c @@ -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; diff --git a/src/cmd/acme/look.c b/src/cmd/acme/look.c index db699274..66c6c664 100644 --- a/src/cmd/acme/look.c +++ b/src/cmd/acme/look.c @@ -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; |