File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1627,18 +1627,21 @@ function web_editor(config) {
16271627
16281628 var daplink = usePartialFlashing ? window . dapwrapper . daplink : window . daplink ;
16291629 daplink . stopSerialRead ( ) ;
1630+ daplink . removeAllListeners ( DAPjs . DAPLink . EVENT_SERIAL_DATA ) ;
1631+ REPL . uninstallKeyboard ( ) ;
1632+ REPL . io . pop ( ) ;
16301633 REPL = null ;
16311634 }
16321635
16331636 function doSerial ( ) {
1634- console . log ( "Setting Up Serial Terminal" ) ;
1635- // Hide terminal
1637+ // Hide terminal if it is currently shown
16361638 var serialButton = config [ "translate" ] [ "static-strings" ] [ "buttons" ] [ "command-serial" ] ;
16371639 if ( $ ( "#repl" ) . css ( 'display' ) != 'none' ) {
16381640 closeSerial ( ) ;
16391641 return ;
16401642 }
16411643
1644+ console . log ( "Setting Up Serial Terminal" ) ;
16421645 // Check if we need to connect
16431646 if ( $ ( "#command-connect" ) . is ( ":visible" ) ) {
16441647 doConnect ( true ) ;
You can’t perform that action at this time.
0 commit comments