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 @@ -54,6 +54,8 @@ export class CommandManager {
5454 }
5555
5656 handlePromptEnd ( ) {
57+ if ( this . #activeCommand. promptEndMarker != null ) return ;
58+
5759 this . #activeCommand. promptEndMarker = this . #terminal. registerMarker ( 0 ) ;
5860 if ( this . #activeCommand. promptEndMarker ?. line === this . #terminal. buffer . active . cursorY ) {
5961 this . #activeCommand. promptEndX = this . #terminal. buffer . active . cursorX ;
@@ -275,7 +277,8 @@ export class CommandManager {
275277 }
276278 }
277279
278- const cursorAtEndOfInput = ( this . #activeCommand. promptText . length + command . trim ( ) . length ) % this . #terminal. cols <= this . #terminal. buffer . active . cursorX ;
280+ const cursorAtEndOfInput =
281+ ( this . #activeCommand. promptText . length + command . trimEnd ( ) . length ) % this . #terminal. cols <= this . #terminal. buffer . active . cursorX ;
279282 let hasOutput = false ;
280283
281284 let cell = undefined ;
@@ -288,7 +291,7 @@ export class CommandManager {
288291 }
289292 }
290293
291- const commandPostfix = this . #activeCommand. promptText . length + command . trim ( ) . length < this . #terminal. buffer . active . cursorX ? " " : "" ;
294+ const commandPostfix = this . #activeCommand. promptText . length + command . trimEnd ( ) . length < this . #terminal. buffer . active . cursorX ? " " : "" ;
292295 this . #activeCommand. persistentOutput = this . #activeCommand. hasOutput && hasOutput ;
293296 this . #activeCommand. hasOutput = hasOutput ;
294297 this . #activeCommand. suggestionsText = suggestions . trim ( ) ;
You can’t perform that action at this time.
0 commit comments