From e384e4fde604564a3bc140b89bb8c1556a726464 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 30 Aug 2024 16:15:16 +0200 Subject: implemented and <^E> commands for configuring encodings and translating between glyph and byte offsets (refs #5) * ^E is heavily overloaded and can also be used to check whether a given index is valid (as it is the same that most movement commands to internally). Besides that, it is mainly useful for interfacing with Scintilla messages. * EE takes a code page or 0 for ANSI/ASCII. Currently all documents and new registers are UTF-8. There will have to be some kind of codepage inheritance and a single-byte-only mode. --- lib/fnkeys.tes | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/fnkeys.tes') diff --git a/lib/fnkeys.tes b/lib/fnkeys.tes index 036445b..081e7d0 100644 --- a/lib/fnkeys.tes +++ b/lib/fnkeys.tes @@ -36,79 +36,79 @@ *! @[HOME]{ - .ESLINEFROMPOSITIONESPOSITIONFROMLINEU.p + ESLINEFROMPOSITIONESPOSITIONFROMLINE:U.p Q.pU.l - Q.pESGETCOLUMN,4EJ + Q.pESGETCOLUMN,4EJ Q.p-.M#c } @[HOME]{(M[HOME]} 1U[HOME] @[END]{ - .ESLINEFROMPOSITIONESGETLINEENDPOSITIONU.p + ESLINEFROMPOSITIONESGETLINEENDPOSITIONU.p Q.pESGETCOLUMN,4EJ - Q.p-.M#c + Q.p:-.M#c } @[END]{(M[END]} 1U[END] @[NPAGE]{ 0,4EJ - .ESLINEFROMPOSITION+(ESLINESONSCREEN) + ESLINEFROMPOSITION+(ESLINESONSCREEN) ESPOSITIONFROMLINEU.p - Q.p"< Z | Q.p '-.M#c + Q.p"< Z | Q.p: '-.M#c } @[NPAGE]{(M[NPAGE]} 1U[NPAGE] @[PPAGE]{ 0,4EJ - .ESLINEFROMPOSITION-(ESLINESONSCREEN)U.l - Q.l"< 0 | Q.lESPOSITIONFROMLINE '-.M#c + ESLINEFROMPOSITION-(ESLINESONSCREEN)U.l + Q.l"< 0 | Q.lESPOSITIONFROMLINE: '-.M#c } @[PPAGE]{(M[PPAGE]} 1U[PPAGE] @[LEFT]{ ."=0|.-1'U.p - Q.pESGETCOLUMN,4EJ + Q.pESGETCOLUMN,4EJ Q.p-.M#c } @[LEFT]{(M[LEFT]} 1U[LEFT] @[SLEFT]{ - 0,0,.ESWORDSTARTPOSITIONESWORDSTARTPOSITIONU.p + 0,0,ESWORDSTARTPOSITIONESWORDSTARTPOSITIONU.p Q.pESGETCOLUMN,4EJ - Q.p-.M#c + Q.p:-.M#c } @[SLEFT]{(M[SLEFT]} 1U[SLEFT] @[RIGHT]{ .-Z"=.|.+1'U.p - Q.pESGETCOLUMN,4EJ + Q.pESGETCOLUMN,4EJ Q.p-.M#c } @[RIGHT]{(M[RIGHT]} 1U[RIGHT] @[SRIGHT]{ - 0,0,.ESWORDENDPOSITIONESWORDENDPOSITIONU.p + 0,0,ESWORDENDPOSITIONESWORDENDPOSITIONU.p Q.pESGETCOLUMN,4EJ - Q.p-.M#c + Q.p:-.M#c } @[SRIGHT]{(M[SRIGHT]} 1U[SRIGHT] @[UP]{ - 4EJ(.ESLINEFROMPOSITION-1)ESFINDCOLUMN-.M#c + 4EJ(ESLINEFROMPOSITION-1)ESFINDCOLUMN:-.M#c } @[UP]{(M[UP]} 1U[UP] @[DOWN]{ - 4EJ(.ESLINEFROMPOSITION+1)ESFINDCOLUMN-.M#c + 4EJ(ESLINEFROMPOSITION+1)ESFINDCOLUMN:-.M#c } @[DOWN]{(M[DOWN]} 1U[DOWN] -- cgit v1.2.3