From 5944cd09ce2485d1148cb1acd9a5a6430c0ab838 Mon Sep 17 00:00:00 2001 From: d6 Date: Fri, 10 Feb 2023 21:12:29 -0500 Subject: [PATCH] add visual bell --- term.tal | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/term.tal b/term.tal index 8375ff9..9eb7620 100644 --- a/term.tal +++ b/term.tal @@ -19,7 +19,6 @@ ( 13. hide cursor when not moving for awhile ) ( 14. configure terminal dimensions (config file?) ) ( 15. blinking text? ) -( 16. visual bell? ) ( ANSI sequences ) ( ) @@ -112,6 +111,7 @@ @lit-click-y $2 @lit-drag-x $2 @lit-drag-y $2 + @flash $1 ( terminal settings ) @irm $1 ( 01: insert and move right, 00: replace and overwrite ) @@ -119,6 +119,9 @@ @tcem $1 ( 01: cursor is visible, 00: cursor is invisible ) @paste $1 ( 01: bracketed paste is on, 00: is off ) + ( user configuration ) + @visual-bell $1 + |0100 ( metadata ) ;meta .System/metadata DEO2 @@ -179,6 +182,9 @@ ;shell .Console/exec DEO2 ( set up bash subprocess ) #80 .Console/mode DEO ( start bash subprocess ) + ( user defaults ) + #01 .visual-bell STZ + ( set to 01 to enable debug log ) #01 .debug STZ @@ -259,11 +265,18 @@ INC2 GTH2k ?&yloop POP2 POP2 POP2r - .is-lit LDZ #00 EQU ?&pointer redraw-selection !&finally + .is-lit LDZ #00 EQU ?&flashing redraw-selection !&finally + &flashing .flash LDZ #00 EQU ?&pointer flash-bell draw-cursor BRK &pointer draw-pointer &finally draw-cursor #00 .dirty STZ &done BRK +@flash-bell ( -> ) + .flash LDZ #01 SUB .flash STZ + #0000 DUP2 .lit-click-x STZ2 .lit-click-y STZ2 + #004f .lit-drag-x STZ2 #0017 .lit-drag-y STZ2 + redraw-selection clear-selection JMP2r + @screen-to-cell ( row* col* -> ) #30 SFT2 ( width ) #0008 ( border ) ADD2 .Screen/x DEO2 #000c MUL2 ( height ) #0008 ( border ) ADD2 .Screen/y DEO2 @@ -846,7 +859,9 @@ DUP #1b EQU ?read-esc @read-bel ( 07 -> ) - POP BRK ( TODO: flash terminal ) + POP .visual-bell LDZ #00 EQU ?&done + #06 .flash STZ #01 .dirty STZ + &done BRK @read-bs ( 08 -> ) POP