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

Weird formatting of colored prompt message #2

Closed
bilalq opened this issue Feb 23, 2014 · 4 comments
Closed

Weird formatting of colored prompt message #2

bilalq opened this issue Feb 23, 2014 · 4 comments

Comments

@bilalq
Copy link

bilalq commented Feb 23, 2014

The prompt message seems to display strangely when a colored message is used. The cursor appears indented far to the right. When hitting backspace, the text moves back to where it should, but the cursor stays where it is. Once another key is pressed, the text goes back to it's indented location.

Both the colors and cli-color modules cause this to happen.

screen shot 2014-02-23 at 1 42 24 pm

@bilalq
Copy link
Author

bilalq commented Feb 24, 2014

I did a little digging around, and it seems the problem is in the read module that this depends on. I guess this can be marked as closed here.

@bilalq
Copy link
Author

bilalq commented Feb 24, 2014

Actually, I may have closed this prematurely. flatiron/prompt handles this issue by monkey-patching the readline setPrompt interface: https://github.com/flatiron/prompt/blob/master/lib/prompt.js

Is that possibly a direction you guys would want to go here?

@bilalq bilalq reopened this Feb 24, 2014
@satazor
Copy link
Contributor

satazor commented Feb 24, 2014

I'm currently in vacation, I will look closer later. Meanwhile feel free to make a PR with the monkey patched solution!

@satazor
Copy link
Contributor

satazor commented Jun 27, 2014

Closing this.

@satazor satazor closed this as completed Jun 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants