Bottom shell prompt is misaligned on resize #1108

Closed
opened 5 months ago by nfbyte · 2 comments

When setting the initial position of the prompt at the bottom of the window by using:

zsh:

printf '\n%.0s' $(seq 1 100)

fish:

printf '\n%.0s' (seq 1 100)

the prompt jumps up by one line when the terminal window is resized (by e.g. spawning a new window in a tiling window manager).


Steps to reproduce:

  1. Open a terminal window
  2. Open a new terminal window (on the right)
  3. Close the new terminal window

This behaviour is not present in Alacritty.

When setting the initial position of the prompt at the bottom of the window by using: zsh: ```sh printf '\n%.0s' $(seq 1 100) ``` fish: ```sh printf '\n%.0s' (seq 1 100) ``` the prompt jumps up by one line when the terminal window is resized (by e.g. spawning a new window in a tiling window manager). * * * Steps to reproduce: 1. Open a terminal window ![](https://codeberg.org/attachments/5b22216d-a77b-4708-9928-a5fecfb5e68f) 2. Open a new terminal window (on the right) ![](https://codeberg.org/attachments/43aaccd3-9a1a-4e2a-9e03-149f085b79ce) 3. Close the new terminal window ![](https://codeberg.org/attachments/6f6ab082-7867-4bc0-af70-5fb9d8d42183) * * * This behaviour is not present in Alacritty.
Poster

As a pseudo-workaround in zsh (which I found here) I've added this:

TPUT_END=$(tput cup 9999 0)
PS1="${TPUT_END}${PS1}"

which seems to keep the prompt on the bottom, however a new line is still inserted above the prompt (and I've noticed some other weird glitches as well).

As a pseudo-workaround in zsh (which I found [here](https://unix.stackexchange.com/a/298822/480162)) I've added this: ```sh TPUT_END=$(tput cup 9999 0) PS1="${TPUT_END}${PS1}" ``` which seems to keep the prompt on the bottom, however a new line is still inserted above the prompt (and I've noticed some other weird glitches as well).
Owner

Yeah, known issue that hasn't bothered me enough to fix yet. But sure, I do consider it a bug that should be fixed.

Yeah, known issue that hasn't bothered me enough to fix yet. But sure, I do consider it a bug that should be fixed.
dnkl added the
bug
label 4 months ago
dnkl closed this issue 4 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: dnkl/foot#1108
Loading…
There is no content yet.