diff options
author | Russ Cox <rsc@swtch.com> | 2007-11-27 15:39:06 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2007-11-27 15:39:06 -0500 |
commit | 83ab7d88962d717ca5729e7337706b6e4da48af6 (patch) | |
tree | 2dcaeba8fec383733357f4db5e9c2d0718767838 /src/cmd/acme | |
parent | 00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff) | |
parent | 00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff) | |
download | plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.gz plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.bz2 plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.zip |
merge
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; |