add visual bell

This commit is contained in:
~d6 2023-02-10 21:12:29 -05:00
parent 958b4a508f
commit 5944cd09ce
1 changed files with 18 additions and 3 deletions

View File

@ -19,7 +19,6 @@
( 13. hide cursor when not moving for awhile ) ( 13. hide cursor when not moving for awhile )
( 14. configure terminal dimensions (config file?) ) ( 14. configure terminal dimensions (config file?) )
( 15. blinking text? ) ( 15. blinking text? )
( 16. visual bell? )
( ANSI sequences ) ( ANSI sequences )
( ) ( )
@ -112,6 +111,7 @@
@lit-click-y $2 @lit-click-y $2
@lit-drag-x $2 @lit-drag-x $2
@lit-drag-y $2 @lit-drag-y $2
@flash $1
( terminal settings ) ( terminal settings )
@irm $1 ( 01: insert and move right, 00: replace and overwrite ) @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 ) @tcem $1 ( 01: cursor is visible, 00: cursor is invisible )
@paste $1 ( 01: bracketed paste is on, 00: is off ) @paste $1 ( 01: bracketed paste is on, 00: is off )
( user configuration )
@visual-bell $1
|0100 |0100
( metadata ) ( metadata )
;meta .System/metadata DEO2 ;meta .System/metadata DEO2
@ -179,6 +182,9 @@
;shell .Console/exec DEO2 ( set up bash subprocess ) ;shell .Console/exec DEO2 ( set up bash subprocess )
#80 .Console/mode DEO ( start bash subprocess ) #80 .Console/mode DEO ( start bash subprocess )
( user defaults )
#01 .visual-bell STZ
( set to 01 to enable debug log ) ( set to 01 to enable debug log )
#01 .debug STZ #01 .debug STZ
@ -259,11 +265,18 @@
INC2 INC2
GTH2k ?&yloop GTH2k ?&yloop
POP2 POP2 POP2r 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 &pointer draw-pointer
&finally draw-cursor #00 .dirty STZ &finally draw-cursor #00 .dirty STZ
&done BRK &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* -> ) @screen-to-cell ( row* col* -> )
#30 SFT2 ( width ) #0008 ( border ) ADD2 .Screen/x DEO2 #30 SFT2 ( width ) #0008 ( border ) ADD2 .Screen/x DEO2
#000c MUL2 ( height ) #0008 ( border ) ADD2 .Screen/y DEO2 #000c MUL2 ( height ) #0008 ( border ) ADD2 .Screen/y DEO2
@ -846,7 +859,9 @@
DUP #1b EQU ?read-esc DUP #1b EQU ?read-esc
@read-bel ( 07 -> ) @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 -> ) @read-bs ( 08 -> )
POP POP