Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repl: fix preview cursor position #31293

Conversation

BridgeAR
Copy link
Member

The cusor position was off in case the preview was exactly as long
as the current terminal was wide.
To fix the issue this switches the calculation from a relative value to an absolute one.

Fixes: #31291

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

The cusor position was off in case the preview was exactly as long
as the current terminal was wide.

Fixes: nodejs#31291
@nodejs-github-bot nodejs-github-bot added the repl Issues and PRs related to the REPL subsystem. label Jan 10, 2020
@BridgeAR BridgeAR requested a review from ZYSzys January 10, 2020 15:04
@nodejs-github-bot
Copy link
Collaborator

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 11, 2020
BridgeAR added a commit that referenced this pull request Jan 12, 2020
The cusor position was off in case the preview was exactly as long
as the current terminal was wide.

PR-URL: #31293
Fixes: #31291
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@BridgeAR
Copy link
Member Author

Landed in af5ddf2 🎉

@BridgeAR BridgeAR closed this Jan 12, 2020
MylesBorins pushed a commit that referenced this pull request Jan 16, 2020
The cusor position was off in case the preview was exactly as long
as the current terminal was wide.

PR-URL: #31293
Fixes: #31291
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@codebytere codebytere mentioned this pull request Jan 16, 2020
@BridgeAR BridgeAR deleted the 2020-01-10-repl-fix-preview-regression branch January 20, 2020 12:10
@codebytere
Copy link
Member

@BridgeAR this will need a manual backport - it's blocked on previous repl changes which haven't been able to land.

1 similar comment
@codebytere
Copy link
Member

@BridgeAR this will need a manual backport - it's blocked on previous repl changes which haven't been able to land.

@targos targos removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-blocked-v12.x labels Apr 25, 2020
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
The cusor position was off in case the preview was exactly as long
as the current terminal was wide.

PR-URL: nodejs#31293
Fixes: nodejs#31291
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
targos pushed a commit that referenced this pull request Apr 28, 2020
The cusor position was off in case the preview was exactly as long
as the current terminal was wide.

PR-URL: #31293
Fixes: #31291
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

repl: bug when the length of preview output is exactly equal to the terminal width
7 participants