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

Cursor misaligned in multiline mode when terminal width less than prompt len #213

Open
scopatz opened this issue Jan 10, 2016 · 1 comment

Comments

@scopatz
Copy link
Contributor

scopatz commented Jan 10, 2016

The cursor in multiline mode starts doing weird things if the prompt text is too large for the terminal size. For example, for a small terminal, just cd'ing into a directory will place the cursor at the end of the second line as seen by <C> below.

scopatz@localhost ~ $ xonsh --shell-type=prompt_toolkit
scopatz@localhost ~ $ cd xonsh/xonsh/ptk/__pycache__
                      /
scopatz@localhost ~/xonsh/xonsh/ptk/__pycache__ xonf
ig $                                               <C>          

Then if you start typing, it will overwrite the first line:

scopatz@localhost ~ $ xonsh --shell-type=prompt_toolkit
scopatz@localhost ~ $ cd xonsh/xonsh/ptk/__pycache__
                      /
scopatz@localhost ~/xonsh/xonsh/ptk/__pycache__ echo
xonfig $                                      <C>

Resizing the terminal so that the prompt fits on one line, fixes the prompt dynamically:

scopatz@localhost ~/xonsh/xonsh/ptk/__pycache__ xonfig $ echo

This is on prompt-toolkit v0.57

@scopatz
Copy link
Contributor Author

scopatz commented Jan 10, 2016

I believe that @adqm and @gforsyth first noticed this issue.

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