repl: changes ctrl+u to delete from cursor to line start
Closes: #20145 PR-URL: https://github.com/nodejs/node/pull/20686 Fixes: https://github.com/nodejs/node/issues/20145 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
0c852a1795
commit
eeb1d514ad
@ -800,10 +800,8 @@ Interface.prototype._ttyWrite = function(s, key) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'u': // delete the whole line
|
||||
this.cursor = 0;
|
||||
this.line = '';
|
||||
this._refreshLine();
|
||||
case 'u': // delete from current to start of line
|
||||
this._deleteLineLeft();
|
||||
break;
|
||||
|
||||
case 'k': // delete from current to end of line
|
||||
|
Loading…
x
Reference in New Issue
Block a user