Skip to content

Commit

Permalink
readline: skip escaping characters again
Browse files Browse the repository at this point in the history
This is a minor performance improvement for readline. It skips to
escape individual characters again after escaping them before.

Signed-off-by: Ruben Bridgewater <[email protected]>

PR-URL: #41005
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
BridgeAR authored and danielleadams committed Dec 13, 2021
1 parent 513305c commit 8fac878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/readline/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ class Interface extends InterfaceConstructor {
offset += this.tabSize - (offset % this.tabSize);
continue;
}
const width = getStringWidth(char);
const width = getStringWidth(char, false /* stripVTControlCharacters */);
if (width === 0 || width === 1) {
offset += width;
} else {
Expand Down

0 comments on commit 8fac878

Please sign in to comment.