mirror of
https://github.com/louislam/dockge.git
synced 2024-11-27 13:14:03 +00:00
Fix removeInput
This commit is contained in:
parent
48ccc27b9f
commit
d51cc39711
1 changed files with 4 additions and 2 deletions
|
@ -154,10 +154,12 @@ export default {
|
|||
},
|
||||
|
||||
removeInput() {
|
||||
const backspaceCount = 2 * this.terminalInputBuffer.length - this.cursorPosition;
|
||||
const textAfterCursorLength = this.terminalInputBuffer.length - this.cursorPosition;
|
||||
const spaces = " ".repeat(textAfterCursorLength);
|
||||
const backspaceCount = this.terminalInputBuffer.length;
|
||||
const backspaces = "\b \b".repeat(backspaceCount);
|
||||
this.cursorPosition = 0;
|
||||
this.terminal.write(backspaces);
|
||||
this.terminal.write(spaces + backspaces);
|
||||
this.terminalInputBuffer = "";
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue