I've found that sometimes when I CTRL-C out of an autocompletion the previous line of the prompt gets erased unexpectedly. Here's a gif showing this happening with ls, vim and fzf: http://imgur.com/1jTrrzA
Here's an outline of events that happen:
ls all the filesls then tab complete and CTRL-C out of the first completion (previous line of prompt gets erased)ls then tab complete and CTRL-C out of the second completion. The previous line of the prompt doesn't get erasedCTRL-C, this is my mistake. However, if I CTRL-C out of this example (the not-first completion) the previous line isn't erasedI've found that the issue as shown during step 2 and step 4 still exists with a single line prompt. However fzf isn't broken with a single line prompt.
My entire prompt can be found at http://pastebin.com/JwufRy6m which is a modified version of https://github.com/sorin-ionescu/prezto/blob/master/modules/prompt/functions/prompt_sorin_setup to work with mercurial repositories at my company. The lines of interest (I think) in my prompt file are 166 and 167 (line 167 == line 166 minus $prompt_newline).
I've tried creating a multiline prompt without using $prompt_newline by doing:
NEWLINE=$'\n'
PROMPT=.....${NEWLINE}....
But that didn't help either which kinda makes sense to me because part of the problem still exists with single-line prompts.
I thought that #1245 was this issue but checking the version of zsh shows I'm on 5.2:
❯❯❯ zsh --version (master) 11:20AM
zsh --version
zsh 5.2 (x86_64-redhat-linux-gnu)
I'm on commit 4f19700919c8ebbaf75755fc0d03716d13183f49 for prezto. I checked this by cding into ~/.zprezto and running git log
Hm, I see something similar to this with tab completion eating the previous line with multiline prompts... not sure what would be causing it yet though.
@belak #1245
Thanks for the information! I'll keep an eye out for 5.3.2 and close this when it's fixed.
I have the same issue as @cmcginty, especially when completing paths in a "git add" command...
Applying this patch on Arch linux worked for me:
https://github.com/zsh-users/zsh/commit/34656ec2f00d6669cef56afdbffdd90639d7b465.patch
I assume this is fixed now that 5.4.2 is out. Please feel free to let me know if it's still broken.
It is! Thank you.