diff options
author | rsc <devnull@localhost> | 2004-06-20 16:29:19 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-06-20 16:29:19 +0000 |
commit | 64055489f6fde138ba72ec51df5fb319544ec770 (patch) | |
tree | cfb87c4e12e66328e957cc2581fb309108081dbe /src/cmd | |
parent | 3f23048f7b69bd4018939ad608797e818828e871 (diff) | |
download | plan9port-64055489f6fde138ba72ec51df5fb319544ec770.tar.gz plan9port-64055489f6fde138ba72ec51df5fb319544ec770.tar.bz2 plan9port-64055489f6fde138ba72ec51df5fb319544ec770.zip |
fix scrolling
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/acme/text.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c index 6dc24bb7..3d9118b1 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -637,6 +637,7 @@ texttype(Text *t, Rune r) int nr; Rune *rp; Text *u; + int precise; if(t->what!=Body && r=='\n') return; @@ -659,7 +660,7 @@ texttype(Text *t, Rune r) n = t->fr.maxlines/3; goto case_Down; case Kscrollonedown: - n = mousescrollsize(t->fr.maxlines)-1; /* -1 counters a bug somewhere else */ + n = mousescrollsize(t->fr.maxlines); if(n <= 0) n = 1; goto case_Down; @@ -667,19 +668,19 @@ texttype(Text *t, Rune r) n = 2*t->fr.maxlines/3; case_Down: q0 = t->org+frcharofpt(&t->fr, Pt(t->fr.r.min.x, t->fr.r.min.y+n*t->fr.font->height)); - textsetorigin(t, q0, FALSE); + textsetorigin(t, q0, TRUE); return; case Kup: n = t->fr.maxlines/3; goto case_Up; case Kscrolloneup: - n = mousescrollsize(t->fr.maxlines)+1; /* +1 counters a bug somewhere else */ + n = mousescrollsize(t->fr.maxlines); goto case_Up; case Kpgup: n = 2*t->fr.maxlines/3; case_Up: q0 = textbacknl(t, t->org, n); - textsetorigin(t, q0, FALSE); + textsetorigin(t, q0, TRUE); return; case Khome: textshow(t, 0, 0, FALSE); |