Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6814505

Browse files
BridgeARdanielleadams
authored andcommittedDec 13, 2021
readline: skip escaping characters again
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]>
1 parent 4f03cd4 commit 6814505

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/internal/readline/interface.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ class Interface extends InterfaceConstructor {
862862
offset += this.tabSize - (offset % this.tabSize);
863863
continue;
864864
}
865-
const width = getStringWidth(char);
865+
const width = getStringWidth(char, false /* stripVTControlCharacters */);
866866
if (width === 0 || width === 1) {
867867
offset += width;
868868
} else {

0 commit comments

Comments
 (0)
Please sign in to comment.