readline: fix remembered column in multiline by watilde · Pull Request #64126 · nodejs/node · GitHub
Skip to content

readline: fix remembered column in multiline#64126

Open
watilde wants to merge 1 commit into
nodejs:mainfrom
watilde:fix/readline-multiline-remembered-column
Open

readline: fix remembered column in multiline#64126
watilde wants to merge 1 commit into
nodejs:mainfrom
watilde:fix/readline-multiline-remembered-column

Conversation

@watilde

@watilde watilde commented Jun 25, 2026

Copy link
Copy Markdown
Member

When moving the cursor vertically past a line too short to hold the current column, the column is remembered and restored on a later, longer line. The remembered column is a visual column that includes the continuation prompt width, but it was compared against the raw target line length, so columns in the (length, length + promptLen) range wrongly clamped to the end of the line instead of being restored.

When moving the cursor vertically past a line too short to hold the
current column, the column is remembered and restored on a later, longer
line. The remembered column is a visual column that includes the
continuation prompt width, but it was compared against the raw target
line length, so columns in the (length, length + promptLen) range
wrongly clamped to the end of the line instead of being restored.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. readline Issues and PRs related to the built-in readline module. labels Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. readline Issues and PRs related to the built-in readline module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants