zsh4humans
zsh4humans copied to clipboard
fzf breaks if window size changes and it is interrupted
Hi Roman, got a funny bug with fzf and p10k involved. I only tested this on z4h v3. I don't know if it triggers on v2 as well.
If you resize the terminal while in fzf and interrupt it by pressing Ctrl-C or ESC the prompt breaks.
Steps to reproduce:
- Open a terminal
- Type
vim
tab OR Ctrl-R - Resize the terminal emulator
- Press ESC or Ctrl-C or tab
Terminalemulator: Tilix, Xterm Z4H version: v3 zsh version: zsh 5.8 (x86_64-pc-linux-gnu) OS: Manjaro up-to-date WM: i3wm
Edit: tab triggers the bug as well
Reproduced. Fixing prompt should be easy but I'm not yet sure how to fix cursor position. Will take a closer look some time later.
For documentation: Can also confirm this for v4.
In v5 (in docker) it happens less often or in a smaller manner. I broke the prompt once, but never again. The cursor position still breaks though.
Edit: Broke the prompt a second time now, but I can't find the pattern that breaks it..
Steps to reproduce in v5:
❯ sudo docker run -e TERM -e COLORTERM -w /root -it --rm alpine sh -uec '
sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
'
# selected PC, Standard, 1, y, quit p10k setup
- fill history with 10 commands
- resize terminal to 10 lines
-
reset
- Ctrl-R
- Double vertical window size to ~20 lines
- Esc
In this example the cursor position is not broken. If you swap steps 2 and 5 cursor position gets messed up in addition.
Edit:
cd /etc/
tabtab instead of filling the history and using Ctrl-R works as well.