You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Formatted strings end up with ANSI color codes are part of the string. Looking up the length property on them returns a misleading result. Would you accept a patch to strip ANSI codes before reading the length of the prompt?
The text was updated successfully, but these errors were encountered:
I cut a similar issue to the node-promptly module earlier: moxystudio/node-promptly#2
When the prompt contains colored/formatted text, the cursor is indented far to the right.
I skimmed through the code, and I think I see where the issue is:
https://github.com/isaacs/read/blob/master/lib/read.js#L56
Formatted strings end up with ANSI color codes are part of the string. Looking up the length property on them returns a misleading result. Would you accept a patch to strip ANSI codes before reading the length of the prompt?
The text was updated successfully, but these errors were encountered: