diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2013-06-05 11:32:00 +0000 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2013-06-05 11:32:00 +0000 |
| commit | 19ff07da28f1c334017dd2f65de7e0377aa8e494 (patch) | |
| tree | 8f9ced5da7bff625195c394458593b371e4ab191 /appl/acme/text.b | |
| parent | 534d134e39305c47df7381629326a008baf1b335 (diff) | |
add Kscrollup/down to acme
Diffstat (limited to 'appl/acme/text.b')
| -rw-r--r-- | appl/acme/text.b | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/appl/acme/text.b b/appl/acme/text.b index c374bf8d..953a08ea 100644 --- a/appl/acme/text.b +++ b/appl/acme/text.b @@ -689,7 +689,19 @@ Text.typex(t : self ref Text, r : int, echomode : int) } if(t.what!=Body && r=='\n') return; - case(r){ + case r { + Dat->Kscrolldown=> + if(t.what == Body){ + q0 = t.org+frcharofpt(t.frame, (t.frame.r.min.x, t.frame.r.min.y+2*t.frame.font.height)); + t.setorigin(q0, FALSE); + } + return; + Dat->Kscrollup=> + if(t.what == Body){ + q0 = t.backnl(t.org, 4); + t.setorigin(q0, FALSE); + } + return; Kdown or Keyboard->Down => n = t.frame.maxlines/2; q0 = t.org+frcharofpt(t.frame, (t.frame.r.min.x, t.frame.r.min.y+n*t.frame.font.height)); |
