Alt-c overwrites prompt that is in next line
Drllap opened this issue · 7 comments
Checklist
- I have read through the manual page (
man fzf
) - I have searched through the existing issues
- For bug reports, I have checked if the bug is reproducible in the latest version of fzf
Output of fzf --version
0.48.1 (9ffe951)
OS
- Linux
- macOS
- Windows
- Etc.
Shell
- bash
- zsh
- fish
Problem / Steps to reproduce
I'm using starship and have a theme where the prompt continues on the next line. If I use Alt+C
to cd the curser ends up before the prompt:
When I go out of vi-insert-mode
the prompt overwrites what was written
Edit:
This is what I have in my .bashrc
eval "$(fzf --bash)"
eval "$(starship init bash)"
The starship config can be found here
Note that if I execute after leaving the vi-insert-mode
the "correct" thing is executed (the prompt arrow doesn't affect it) so this is only a minor visual glitch
Also, why do I get `__fzf_cd__`
when I use Alt+c
? I don't get `__fzf_history__`
when I use Ctrl+r
or nvim ** <tab>
.
Is it intentional?
this is probably how u play with fzf, i got this issue before, but it does not appear now.
@tmpm697 I'm not entirely sure what you mean by "how you play with fzf"
I'm just using the default keybindings. The only thing I have in my .bashrc
eval "$(fzf --bash)"
eval "$(starship init bash)"
Also, why do I get
`__fzf_cd__`
when I useAlt+c
? I don't get`__fzf_history__`
when I useCtrl+r
ornvim ** <tab>
.
Is it intentional?
That's because ALT-C uses a different mechanism than the others. No -x
option.
Lines 126 to 144 in 7bac1a7
The reason we decided to use this method (only for ALT-C) can be found here: #2674 (and an older one: #546 (comment))
I have no experience with starship, so I'm currently unaware of how you can work around the issue.
Ok, I narrowed it down a bit. This is pretty much what starship does when I have deleted most of the things that aren't relevant to my issue:
function set_PS1 {
PS1="something cool
\[�[1;38;2;152;151;26m\]\[�[0m\] "
}
precmd_functions+=(set_PS1)
Edit: Ok github doesn't render all of the "characters" in the file so here is the file:
test-bashrc.txt