diff options
| author | rsc <devnull@localhost> | 2004-06-11 04:13:03 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-06-11 04:13:03 +0000 |
| commit | 038aa0220a3333ee49b19dcca9d084499d5a75e6 (patch) | |
| tree | 1a020ae6693c2e319635be6f31850df750e0b20a /src/cmd/acme/text.c | |
| parent | d7037d6280a74fd7baa53d39f3fb3b68e18a54f1 (diff) | |
scrolling
Diffstat (limited to 'src/cmd/acme/text.c')
| -rw-r--r-- | src/cmd/acme/text.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c index a69b46fe..6dc24bb7 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -659,7 +659,9 @@ texttype(Text *t, Rune r) n = t->fr.maxlines/3; goto case_Down; case Kscrollonedown: - n = 1; + n = mousescrollsize(t->fr.maxlines)-1; /* -1 counters a bug somewhere else */ + if(n <= 0) + n = 1; goto case_Down; case Kpgdown: n = 2*t->fr.maxlines/3; @@ -671,7 +673,7 @@ texttype(Text *t, Rune r) n = t->fr.maxlines/3; goto case_Up; case Kscrolloneup: - n = 2; /* feels like this should be n=1, but that does nothing */ + n = mousescrollsize(t->fr.maxlines)+1; /* +1 counters a bug somewhere else */ goto case_Up; case Kpgup: n = 2*t->fr.maxlines/3; |