summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Kolomiiets <yarikos@gmail.com>2016-11-04 14:08:41 +0200
committerYaroslav Kolomiiets <yarikos@gmail.com>2016-11-04 14:08:41 +0200
commit39d2105807e5fdd337df2cb2907631b2ba5afad3 (patch)
tree35bb3fd8b3614ca5cc1976ce3c73dbf4a4ee4e72
parentddf161d27871e47d85fd56e8403c715af8ce43c8 (diff)
acme: handle ^A, ^E keys
-rw-r--r--appl/acme/text.b15
-rw-r--r--dis/acme/text.disbin19736 -> 20063 bytes
2 files changed, 15 insertions, 0 deletions
diff --git a/appl/acme/text.b b/appl/acme/text.b
index 0aa0d482..7fdce3f3 100644
--- a/appl/acme/text.b
+++ b/appl/acme/text.b
@@ -746,6 +746,21 @@ Text.typex(t : self ref Text, r : int, echomode : int)
else if(t.q1 != t.file.buf.nc)
t.show(t.q1+1, t.q1+1, TRUE);
return;
+ 1 => # ^A: beginning of line
+ t.commit(TRUE);
+ # go to where ^U would erase, if not already at BOL
+ nnb = 0;
+ if(t.q0>0 && t.readc(t.q0-1)!='\n')
+ nnb = t.bswidth(16r15);
+ t.show(t.q0-nnb, t.q0-nnb, TRUE);
+ return;
+ 5 => # ^E: end of line
+ t.commit(TRUE);
+ q0 = t.q0;
+ while(q0<t.file.buf.nc && t.readc(q0)!='\n')
+ q0++;
+ t.show(q0, q0, TRUE);
+ return;
}
if(t.what == Body){
seq++;
diff --git a/dis/acme/text.dis b/dis/acme/text.dis
index 09c28b5d..2054aa8f 100644
--- a/dis/acme/text.dis
+++ b/dis/acme/text.dis
Binary files differ