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

bugged cursor position with colored prompts and long commands #10

Open
JohnLunzer opened this issue Nov 19, 2019 · 0 comments
Open

bugged cursor position with colored prompts and long commands #10

JohnLunzer opened this issue Nov 19, 2019 · 0 comments

Comments

@JohnLunzer
Copy link

JohnLunzer commented Nov 19, 2019

I'm using this prompt:

set ::TclReadLine::PROMPT {\033\[36mtclsh-[info patchlevel]\033\[0m \[\033\[34m[file tail [pwd]\033\[0m]\]\033\[31m % \033\[0m}

It's very easy to test for long commands, I just type an 'f' character until the command wraps to the next line. The line wraps too early, it doesn't make it to the end of my terminal, and the cursor position is not where new characters are being displayed. Adding a newline seems to make things even more unpredictable.

Using the non-colored version:

set ::TclReadLine::PROMPT {tclsh[info patchlevel] \[[pwd]\]% }

The wrapping and cursor position behavior is fine. Newlines are handled fine with the uncolored prompt.

I feel like it's probably a pretty easy fix but I can't seem to figure it out.

@JohnLunzer JohnLunzer changed the title bugged cursor position with colored prompts with long commands and prompts with newlines bugged cursor position with colored prompts and long commands Nov 20, 2019
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

1 participant