Skip to content

Commit 8fac878

Browse files
BridgeARdanielleadams
authored andcommitted
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 513305c commit 8fac878

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)