chore: Makes read from keyboard code more clear.
This commit is contained in:
parent
cb12cab250
commit
964938e407
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ export async function readFromKeyboard(stream: ServerChannel, disableEcho: boole
|
||||||
|
|
||||||
if (deltaCursor < 0) {
|
if (deltaCursor < 0) {
|
||||||
// Use old technique if the delta is < 0, as the new one is tailored to the start + 1 to end - 1
|
// Use old technique if the delta is < 0, as the new one is tailored to the start + 1 to end - 1
|
||||||
stream.write("\u0008 \u0008");
|
stream.write(ourBackspace + " " + ourBackspace);
|
||||||
} else {
|
} else {
|
||||||
// Jump forward to the front, and remove the last character
|
// Jump forward to the front, and remove the last character
|
||||||
stream.write(rightEscape.repeat(deltaCursor) + " " + ourBackspace);
|
stream.write(rightEscape.repeat(deltaCursor) + " " + ourBackspace);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue