Skip to content

Commit

Permalink
repl: changes ctrl+u to delete from cursor to line start
Browse files Browse the repository at this point in the history
Closes: #20145

PR-URL: #20686
Fixes: #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>
  • Loading branch information
shobhitchittora authored and BridgeAR committed May 18, 2018
1 parent 0c852a1 commit eeb1d51
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eeb1d51

Please sign in to comment.