File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,19 +97,24 @@ var input = "";
9797term . on ( "data" , ( data ) => {
9898 const code = data . charCodeAt ( 0 ) ;
9999 if ( code == 13 ) { // CR
100- term . write ( "\r\n" ) ;
101- try {
102- rp . pyEval ( input , {
103- stdout : print_to_console
104- } ) ;
105- } catch ( err ) {
106- if ( err instanceof WebAssembly . RuntimeError ) {
107- err = window . __RUSTPYTHON_ERROR || err ;
100+ if ( input [ input . length - 1 ] == ':' ) {
101+ input += data
102+ term . write ( "\r\n....." ) ;
103+ } else {
104+ term . write ( "\r\n" ) ;
105+ try {
106+ rp . pyEval ( input , {
107+ stdout : print_to_console
108+ } ) ;
109+ } catch ( err ) {
110+ if ( err instanceof WebAssembly . RuntimeError ) {
111+ err = window . __RUSTPYTHON_ERROR || err ;
112+ }
113+ print_to_console ( err ) ;
108114 }
109- print_to_console ( err ) ;
115+ term . write ( prompt ) ;
116+ input = "" ;
110117 }
111- term . write ( prompt ) ;
112- input = "" ;
113118 } else if ( code == 127 ) {
114119 term . write ( "\b \b" ) ;
115120 input = input . slice ( 0 , - 1 ) ;
You can’t perform that action at this time.
0 commit comments