summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Kolomiiets <yarikos@gmail.com>2016-11-04 13:35:03 +0200
committerYaroslav Kolomiiets <yarikos@gmail.com>2016-11-04 13:35:03 +0200
commitd5877ddecc352815bcddca0f1214d6b1d0ca4019 (patch)
tree6bb1428bfd571ceae3c8f3eff4c70b2256c34269
parent7e86c01285e50008148bb359c61f64640a812303 (diff)
acme: hande Pgup, Pgdown keys
-rw-r--r--appl/acme/text.b14
-rw-r--r--dis/acme/text.disbin19443 -> 19736 bytes
2 files changed, 12 insertions, 2 deletions
diff --git a/appl/acme/text.b b/appl/acme/text.b
index 32c31ee6..0aa0d482 100644
--- a/appl/acme/text.b
+++ b/appl/acme/text.b
@@ -705,12 +705,22 @@ Text.typex(t : self ref Text, r : int, echomode : int)
}
return;
Kdown or Keyboard->Down =>
- n = t.frame.maxlines/2;
+ n = t.frame.maxlines/3;
+ q0 = t.org+frcharofpt(t.frame, (t.frame.r.min.x, t.frame.r.min.y+n*t.frame.font.height));
+ t.setorigin(q0, FALSE);
+ return;
+ Keyboard->Pgdown =>
+ n = 2*t.frame.maxlines/3;
q0 = t.org+frcharofpt(t.frame, (t.frame.r.min.x, t.frame.r.min.y+n*t.frame.font.height));
t.setorigin(q0, FALSE);
return;
Kup or Keyboard->Up =>
- n = t.frame.maxlines/2;
+ n = t.frame.maxlines/3;
+ q0 = t.backnl(t.org, n);
+ t.setorigin(q0, FALSE);
+ return;
+ Keyboard->Pgup =>
+ n = 2*t.frame.maxlines/3;
q0 = t.backnl(t.org, n);
t.setorigin(q0, FALSE);
return;
diff --git a/dis/acme/text.dis b/dis/acme/text.dis
index ef06f6f2..09c28b5d 100644
--- a/dis/acme/text.dis
+++ b/dis/acme/text.dis
Binary files differ