Closed Riphiphip closed 3 years ago
Can you explain shortly why that commit was reverted? According to https://github.com/NordicPlayground/pc-xterm-lib/pull/11 it did fix an issue, so I assume that issue is now back again.
It was reverted because it introduced a bigger issue. So yes the issue is back, and fixing it might be as easy as moving this.breakCurrentCommand();
after assigning the command
variable, i.e.:
const command = cmd || this.userInput.trim();
this.breakCurrentCommand();
At the moment I'm preoccupied with something else so I don't have time to test it out, but feel free to look into it if anyone has some spare time :)
Describing what bigger issue it introduced might help whoever tries to fix it the next time to make sure they do not introduce the same issue again. ;-) But from my part there is no need to describe it now, since I am currently also too occupied with other things.
@Riphiphip, can you elaborate on the issue that was introduced?
The function that performs the linebreak also sets user input to an empty string. Having the linebreak before calling the commands thus resulted in no user input being passed to the commands and everything broke.
Sorry for not writing it earlier. I was occupied with another project and it slipped my mind
This reverts commit f09e127cf5e8b97b9f876fb8a2bca6b29592364b.