Skip to content

Commit 3845fdc

Browse files
javier-godoypaodb
authored andcommitted
fix: handle null prompt in currentLine getter
1 parent 77ce362 commit 3845fdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/resources/META-INF/frontend/fc-xterm/xterm-console-mixin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ConsoleAddon extends TerminalAddon<IConsoleMixin> {
4040
line += buffer.lines.get(i).translateToString();
4141
}
4242
line = line.replace(/\s+$/,"");
43-
if (this.__yPrompt==range.first) line = line.substring(this.$.prompt.length);
43+
if (this.$.prompt && this.__yPrompt==range.first) line = line.substring(this.$.prompt.length);
4444
return line;
4545
}
4646

0 commit comments

Comments
 (0)