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 jumps few lines up, when hitting tab to complete. #372

Closed
vbauerster opened this issue Nov 28, 2017 · 8 comments
Closed

Cursor jumps few lines up, when hitting tab to complete. #372

vbauerster opened this issue Nov 28, 2017 · 8 comments

Comments

@vbauerster
Copy link

When I type cd then hit Tab to view suggestions, the cursor suddenly jumps few lines up.

Screen_Shot_2017-11-26_at_12.25.18.png

  • ZSH version: zsh 5.4.2 (x86_64-apple-darwin17.0.0)
  • OS information: macOS 10.13.1 (17B48)
  • ZSH version: zsh 5.4.2 (x86_64-apple-darwin17.0.0)
  • Terminal program & version: iTerm Build 3.1.5.beta.2, same in Terminal.app
  • Operating system: macOS 10.13.1 (17B48)
  • ZSH framework: prezto

Regarding pure versions:

I can confirm the issue appears in 4cdd0cf.
Before that commit, it's ok.

At first I've reported it to prezto, but looks like problem in pure theme.

So far I've checked out to tag v1.5.2, as workaround.

@mafredri
Copy link
Collaborator

mafredri commented Nov 28, 2017

Have you tried master? If not, could you? This commit might fix your issue a3b22b2. Keep in mind this also requires the latest zsh-async, so you might need to update that as well.

@vbauerster
Copy link
Author

Switching to master a3b22b2 didn't help. How do I check/update zag-a sync?

@mafredri
Copy link
Collaborator

Sorry, that was supposed to be zsh-async (not zag-a sync), thanks autocorrect.

@vbauerster
Copy link
Author

vbauerster commented Dec 1, 2017

The issue still persist, despite prezto framework has upgraded zsh async module to tag v1.6.0 recently.

@mafredri
Copy link
Collaborator

mafredri commented Dec 1, 2017

Alright, then I believe #362 could be related. Can you try the suggested workaround in #362 (comment)?

@vbauerster
Copy link
Author

vbauerster commented Dec 1, 2017

I confirm commenting out expand-or-complete-with-indicator have fixed the problem.

@mafredri
Copy link
Collaborator

mafredri commented Dec 1, 2017

Ok, that's great (and bad) news. Great that we know how to avoid it, but bad as in I don't have a solution for this. The problem likely stems from the fact that Pure is a multi-line prompt (includes newlines in $PROMPT) and prezto is calling zle redisplay while completion is active. I believe this state confuses ZLE and might actually be a bug in Zsh (e.g. cursor outside editing buffer and prompt is multi-line).

EDIT: The reason reverting to v1.5.2 fixes the problem is that Pure was not yet a multi-line prompt back then, just a single line prompt where we handled the preprompt part manually with terminal codes.

@mafredri
Copy link
Collaborator

This should now be fixed, as per sorin-ionescu/prezto#1512.

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