Commit 96d4643d authored by pazsan's avatar pazsan

Made new scheme work in different bases

Added first/last key do vt100key.fs
parent 357e5b1b
......@@ -206,13 +206,13 @@ require utf-8.fs
[IFUNDEF] #esc 27 Constant #esc [THEN]
: at-deltaxy ( dx dy -- )
: at-deltaxy ( dx dy -- ) base @ >r decimal
?dup IF
#esc emit '[ emit dup abs 0 .r 0< IF 'A ELSE 'B THEN emit
THEN
?dup IF
#esc emit '[ emit dup abs 0 .r 0< IF 'D ELSE 'C THEN emit
THEN ;
THEN r> base ! ;
\ : cygwin? ( -- flag ) s" TERM" getenv s" cygwin" str= ;
\ : at-xy? ( -- x y )
......@@ -252,7 +252,7 @@ require utf-8.fs
2dup chars + r@ swap r@ xc-size xc!+? 2drop drop
r> xc-size >r rot r@ chars + -rot r> chars + ;
: (xins) ( max span addr pos1 xc -- max span addr pos2 )
<xins> .all .rest ;
<xins> key? 0= IF .all .rest THEN ;
: xback ( max span addr pos1 -- max span addr pos2 f )
dup IF over + xchar- over - 0 max .all .rest
ELSE bell THEN 0 ;
......
......@@ -38,6 +38,8 @@ ctrl B trans: D
ctrl F trans: C
ctrl P trans: A
ctrl N trans: B
ctrl A trans: H
ctrl E trans: F
ctrl A 1 tcode
ctrl X 3 tcode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment