romkatv / zsh4humans

A turnkey configuration for Zsh
MIT License
1.81k stars 116 forks source link

z4h-clear-screen-hard-bottom clearing prompt #284

Closed araggohnxd closed 12 months ago

araggohnxd commented 12 months ago

Recently I started trying to adopt the prompt always at bottom. Currently, I have my Ctrl+L binded to z4h-clear-screen-hard-bottom Ctrl+L

# .zshrc

z4h bindkey z4h-clear-screen-hard-bottom Ctrl+L

However, it seems like it doesn't take into account the size of the prompt, and will always try to clear the full terminal height, minus one line:

https://github.com/romkatv/zsh4humans/blob/496c703a730bab7552e329820ef50b778ea9dcf0/fn/z4h-clear-screen-hard-bottom#L6

As you can see in the video below, it causes the prompt itself to be cleared when executing the command:

https://github.com/romkatv/zsh4humans/assets/31555284/47360fb7-015b-4779-9658-4f8447f0b383

By the way, this does not happen with z4h-clear-screen-soft-bottom.

romkatv commented 12 months ago

Which terminal is this? Can you reproduce it with a different terminal?

araggohnxd commented 12 months ago

This is Windows Terminal, version: 1.18.2822.0. I can try with different terminals and get back to you.

araggohnxd commented 12 months ago

Tried with a few different terminal emulators such as Cmder, ConEmu and Hyper. None of them share this problem. Seems to be exclusive to Windows Terminal.

romkatv commented 12 months ago

Please file a bug against Windows Terminal.