File tree Expand file tree Collapse file tree 1 file changed +10
-19
lines changed
Expand file tree Collapse file tree 1 file changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -729,34 +729,25 @@ function getActiveTerminalInput() {
729729 return getActiveTerminalComponent ( ) ?. terminal ?. textarea || null ;
730730}
731731
732- function getInsertValue ( value ) {
733- const text = String ( value ?? "" ) ;
734- if (
735- text . length === 1 &&
736- state . shift &&
737- ! state . ctrl &&
738- ! state . alt &&
739- ! state . meta
740- ) {
741- return shiftKeyMapping ( text ) ;
742- }
743-
744- return text ;
745- }
746-
747732function insertText ( value ) {
748- const text = getInsertValue ( value ) ;
733+ const text = String ( value ?? "" ) ;
749734 if ( ! text ) return false ;
750735
751736 const terminalComponent = getActiveTerminalComponent ( ) ;
752737 if ( terminalComponent ?. terminal ) {
753738 if ( typeof terminalComponent . terminal . paste === "function" ) {
754739 terminalComponent . terminal . paste ( text ) ;
755- } else {
740+ terminalComponent . focus ( ) ;
741+ return true ;
742+ }
743+
744+ if ( terminalComponent . serverMode && terminalComponent . isConnected ) {
756745 terminalComponent . write ( text ) ;
746+ terminalComponent . focus ( ) ;
747+ return true ;
757748 }
758- terminalComponent . focus ( ) ;
759- return true ;
749+
750+ return false ;
760751 }
761752
762753 const { editor } = editorManager ;
You can’t perform that action at this time.
0 commit comments