Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The implementation of _getDisplayPos, used to compute the cursor position and to find out how many lines to clear up when re-rendering the readline output, was counting each line (except the last one) from the input as one row, even if they were wraping. This caused some rendering issues when the 'prompt' have at least one wide line ending with a newline char, duplicating the lines at the top of the prompt when calling _refreshLine (ex: when the user hits backspace). This patch fixes the issue by computing the real rows count for each new line in the input string. PR-URL: nodejs#28272 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
- Loading branch information