From 39d2105807e5fdd337df2cb2907631b2ba5afad3 Mon Sep 17 00:00:00 2001 From: Yaroslav Kolomiiets Date: Fri, 4 Nov 2016 14:08:41 +0200 Subject: acme: handle ^A, ^E keys --- appl/acme/text.b | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'appl') 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