diff --git a/femto.tal b/femto.tal index 19db5b6..a18ccf4 100644 --- a/femto.tal +++ b/femto.tal @@ -1214,7 +1214,7 @@ ;abs-line JMP2 @draw-regex-matches ( -> ) - ;emit-color-reverse JSR2 ( ) + ;emit-color-reverse-bold JSR2 ( ) ;screen-limit JSR2 .buffer/offset LDZ2 ( limit pos ) &loop ( limit pos ) GTH2k #00 EQU ( limit pos limit>pos=0? ) @@ -1238,7 +1238,7 @@ ( return if not searching ) .searching/active LDZ #00 EQU ,&return JCN ( ) .searching/regex LDZ2 ORA ;draw-regex-matches JCN2 - ;emit-color-reverse JSR2 + ;emit-color-reverse-bold JSR2 lmargin ,&x STR2 #0000 ,&y STR2 ( x <- 0, y <- 0 ) .buffer/offset LDZ2 DUP2 ;screen-limit JSR2 SUB2 STH2 ( offset [-count] ) @@ -1353,6 +1353,11 @@ @emit-color-bold ( -> ) LIT2 00 "m LIT2 "1 "; .config/color LDZ2 ,ansi-emit JMP +( ESC [ 3 $x ; 1 ; 7 m ) +( $x is 0-7 ) +@emit-color-reverse-bold ( -> ) + LIT2 00 "m LIT2 "7 "; LIT2 "1 "; .config/color LDZ2 ,ansi-emit JMP + @draw-all ( -> ) ;term-erase-all JSR2 #0000 #0000 ;term-move-cursor JSR2 diff --git a/term.tal b/term.tal index 8742f00..42b07e7 100644 --- a/term.tal +++ b/term.tal @@ -237,7 +237,10 @@ .Controller/key DEI ,&ok JCN ,on-button JMP &ok ,alt? JSR ,on-alt-key JCN ,ctrl? JSR ,on-ctrl-key JCN - .Controller/key DEI .Console/w DEO BRK + .Controller/key DEI + DUP #08 NEQ ,&done JCN + POP #7f ( send DEL instead of BS ) + &done .Console/w DEO BRK @ctrl? ( -> is-down? ) .Controller/button DEI #01 AND JMP2r @alt? ( -> is-down? ) .Controller/button DEI #02 AND JMP2r