warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.07k stars 360 forks source link

Starship PS1 prompt displaying incorrectly #4828

Open MFactor1 opened 5 months ago

MFactor1 commented 5 months ago

Discord username (optional)

mfactor

Describe the bug

PS1 prompt using Starship is incorrectly displaying background fill. Background fill is extending too high above the text. Screenshot from 2024-04-26 01-28-02 Using JetBrains Nerd Font but happens with all other installed fonts.

To reproduce

Create any Starship prompt using background fill, including a special shape character for height reference.

# ~/.config/starship.toml

format = """\ 
[ test ](bg:#ED8796 fg:#494D64)\
[](fg:#ED8796 bg:#494D64)\
"""

Special character in use: e0b0 on https://www.nerdfonts.com/cheat-sheet

Select the Starship PS1 prompt in Warp.

Expected behavior

The top of the background colour should line up with the special character. Screenshot from 2024-04-26 01-28-23 Screenshot taken from GNOME default terminal.

Screenshots

No response

Operating system

Linux

Operating system and version

Fedora 40

Shell Version

zsh 5.9

Current Warp version

v0.2024.04.23.08.01.stable_03

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

April 23, 2024

Additional context

Using Wayland. Happens on both Wayland + Intel GPU and Wayland + NVidia GPU.

eglinfo ouput: eglinfo.txt

log file: warp.log

Does this block you from using Warp daily?

No

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

JacobwBruce commented 5 months ago

Also have this issue, noticed it after installing the most recent update. I thought it might be from startship, or tmux, but I've narrowed it down to definitely be from Warp. Heres a pic of my terminal showing the display issues

Screenshot 2024-04-26 at 9 55 35 AM
HaxagonusD commented 4 months ago

It is probably related to not being able to select nerd fonts

dannyneira commented 3 months ago

Hi Folks, I think the main factor at play here is the way Warp deals with line height and special characters like the ones in Nerd Fonts and Warp's default Hack font. You may also see this across other terminals like iterm. For example, at 1.4 line height, both terminals have issues rendering the test prompt.

CleanShot 2024-06-07 at 16 34 24

Whereas at 1-1.2 value the issue is gone.

CleanShot 2024-06-07 at 16 39 37

That being said, there are other factors at play like font. Trying a different nerd font may also help aswell. I personally run MesloGS nerd font as it's compatible with my prompt, but your prompt setup may look better with a different font.