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

Fix calculated width of prompt with ansi formatting #23

Merged
merged 2 commits into from
Feb 29, 2016

Conversation

gwenn
Copy link
Collaborator

@gwenn gwenn commented Feb 24, 2016

No description provided.

@gwenn
Copy link
Collaborator Author

gwenn commented Feb 24, 2016

Fix #22

@@ -12,7 +12,7 @@ fn main() {
println!("No previous history.");
}
loop {
let readline = rl.readline(">> ");
let readline = rl.readline("\x1b[1;32m>>\x1b[0m ");
Copy link
Owner

Choose a reason for hiding this comment

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

Is it really necessary to have this in the example?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, it is not necessary.
It just shows that rustyline properly handles prompt with ansi escape codes.

@kkawakam
Copy link
Owner

Thanks for the fix.

kkawakam added a commit that referenced this pull request Feb 29, 2016
Fix calculated width of prompt with ansi formatting
@kkawakam kkawakam merged commit 2c7fdac into kkawakam:master Feb 29, 2016
@gwenn gwenn deleted the ansi branch February 29, 2016 16:29
@kkawakam kkawakam mentioned this pull request Mar 6, 2016
5 tasks
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

Successfully merging this pull request may close these issues.

2 participants