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: treat tab as spaces while pasting #25281

Closed
wants to merge 1 commit into from

Conversation

antsmartian
Copy link
Contributor

Fixes: #25272

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

@nodejs-github-bot nodejs-github-bot added the readline Issues and PRs related to the built-in readline module. label Dec 30, 2018
Copy link
Member

@devsnek devsnek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would also change non-whitespace tabs. i think we should change the term interface itself to deal with tabs

@antsmartian
Copy link
Contributor Author

@devsnek Could you please explain on what you mean by "this would also change non-whitespace tabs."? Sorry, I didn't get that.

@BridgeAR
Copy link
Member

@antsmartian it's about e.g. const a = 'foo\tabc'. The tab would be replaced with a whitespace and that's not intended at all.

I just tried to only replace the tabs while visualizing the input but the cursor is still off in those cases. So the only real option I see is to teach readline to position the cursor at the correct position in case tabs are used.

@BridgeAR
Copy link
Member

I am just cleaning up some old REPL issues and PRs. This approach sadly can not work properly, so I'm closing this. Please reopen or open a new PR if someone wants to follow up on this.

@BridgeAR BridgeAR closed this Dec 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
readline Issues and PRs related to the built-in readline module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tabs in the repl cause display issues
4 participants