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

VI mode eats previous prompt #485

Closed
2 tasks done
johnpneumann opened this issue Jul 12, 2019 · 6 comments
Closed
2 tasks done

VI mode eats previous prompt #485

johnpneumann opened this issue Jul 12, 2019 · 6 comments

Comments

@johnpneumann
Copy link

General information

  • Pure version: 1.10.3
  • ZSH version: 5.4.2+
  • Terminal program & version: ssh
  • Operating system: All
  • ZSH framework: prezto and none

I have:

  • Tested with another terminal program and can reproduce the issue:
  • Followed the Integration instructions for my framework

Problem description

If you go quickly from command mode to insert mode, you'll consume the previous line. I tested this with prezto, as well as, just with the pure prompt (manual install).

Reproduction steps

  1. Install the latest pure
  2. Run set -o vi
  3. Run ls -la
  4. Hit esc and i in succession quickly.

My .zshrc:

# .zshrc
autoload -U promptinit; promptinit
prompt pure

Additional Information

@sindresorhus and @mafredri - I'm tagging y'all specifically because it's something worth noting. The prezto team has worked on a fix around the egregious line consumption, however, fast typers (and mechanical keyboard users) are probably going to notice this at some point. This doesn't appear to be a duplicate, however, I didn't go through closed issues. Moving on...

You can see the entire conversation in sorin-ionescu/prezto#1641 which has been tons 'o fun. ;) [to be fair it's been interesting to dig into the source and reproduce on multiple os']

Specifically see this: sorin-ionescu/prezto#1641 (comment) and sorin-ionescu/prezto#1721

I'd be happy to discuss further, but I honestly haven't dug into the pure source code enough to determine how to fix it. It appears that the issue is triggered during the async operation. I can provide the logs I've gathered if it'd be helpful.

@kuba-gaj
Copy link

same problem, had to temporary switch to another prompt :(

@scresante
Copy link

I didn't expect to see this issue pop up again - I was having a similar problem when using zsh-vi-mode .

I've since switched back to using zsh-vim-mode and I encountered this problem when trying out the pure prompt.

Just thought I'd mention it: I've seen it before.

@mafredri
Copy link
Collaborator

mafredri commented Jun 5, 2022

@scresante I can't reproduce, but I can take a look at it if you can provide a repro. (PS. I do consider interop with another plugin a separate issue from this one, so feel free to open a new issue.)

@mafredri
Copy link
Collaborator

mafredri commented Jun 5, 2022

I can't reproduce this issue with zsh 5.9 on macOS, I'm closing this due to age (and there could be fixes to zsh that have fixed this). If it's still a problem, and reproducible with a minimal Pure setup (no plugins and up-to-date zsh), feel free to comment/reopen, if possible with more details on how to reproduce.

Edit: Similar observation here sorin-ionescu/prezto#1987 (that the issue is no longer present)

@mafredri mafredri closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2022
@neovimnovum
Copy link

neovimnovum commented Jun 9, 2022

This is an issue with zsh-vi-mode, imo. I can reproduce this issue on macOS with a fresh installation of zsh 5.9 from Homebrew. The issue goes away when zsh-vi-mode is commented out, and cannot be reproduced when it's only vanilla vi mode. The issue also goes away when pure is disabled. So my best guess is a plugin compatibility issue, just wanted to add a comment here because I've noticed it. It seems to be fixed in a recent pr.

@nwaywood
Copy link

nwaywood commented Sep 7, 2022

I had this problem too, the following fixed it for me jeffreytse/zsh-vi-mode#124 (comment)

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

6 participants