tide icon indicating copy to clipboard operation
tide copied to clipboard

PyCharm terminal broken by right prompt item

Open rpop0 opened this issue 1 year ago • 17 comments
trafficstars

Describe the bug

The whole terminal in pycharm seems to get broken when using a right prompt item.

Steps to reproduce

  1. Have right prompt items enabled.
  2. Open a terminal in PyCharm
  3. Terminal is broken.

Screenshots

image

Environment

Output of tide bug-report:

fish version: 3.6.0
tide version: 6.1.1
term: xterm-256color
os: macOS Sonoma
terminal emulator: Pycharm integrated
fish startup: 8.13 millis
fisher plugins: jorgebucaran/fisher edc/bass ilancosman/tide@v6

Additional context

N/A

rpop0 avatar Jan 04 '24 10:01 rpop0

I am seeing the same issue. I tried disabling Shell Integration as well. It didn't help.

jamesanto avatar Jan 04 '24 14:01 jamesanto

This seems to happen only on MacOS, when I tried it on windows it was fine.

rpop0 avatar Jan 09 '24 08:01 rpop0

Same here on Ubuntu 22.04, reverting to v5 works around the problem

atrepczik avatar Jan 31 '24 15:01 atrepczik

I'm facing the same issue on macOS and PyCharm 2023.3.3. Any ideas on how to solve or hotfix this?

MaxSchambach avatar Feb 13 '24 09:02 MaxSchambach

Same issue. But works fine when "python" item is removed from right promt

keplian avatar May 25 '24 16:05 keplian

in my case it was not python but kubernetes. I suspect several items are affected then.

I replaced the emoji with a dot like this: set --universal tide_kubectl_icon . and that seems to do the trick 😄

StefanLobbenmeierObjego avatar Jun 10 '24 13:06 StefanLobbenmeierObjego

For me, the unexpected icon is tide_python_icon. Set it to . save me 🤣

HAOCHENYE avatar Jul 16 '24 06:07 HAOCHENYE

It seems like [email protected] was using the Unicode Helm Symbol for kubectl before switching to the Nerd Font Kubernetes icon (U+F10FE). Similarly, the Python symbol is now also a Nerd Font icon.

I believe this may be caused by the Jetbrains terminal not handling some Nerd Font characters correctly? Considering the prompt works fine in iTerm with the same icons, it seems likely that Jetbrains is to blame, probably due to handling ambiguous-width characters as double-width.

In the mean time, setting tide_kubectl_icon to the Unicode Helm symbol seemed to work, and setting tide_python_icon to another Python NF icon (U+E73C) seems to work better — this one may not be treated as ambiguous width by Jetbrains, I'm not entirely sure.

pieterrombauts avatar Jul 24 '24 06:07 pieterrombauts

The python icon is also broken in my iterm, maybe I have to update the font to use it? image

But I went ahead and looked up the icons @pieterrombauts mentioned so it is hopefully possible to just copy paste them:

# Python: copied from https://www.unicodepedia.com/unicode/private-use-area/e73c/private-use-area-e73c/
set --universal tide_python_icon 

# Kubernetes: copied from https://www.unicodepedia.com/unicode/miscellaneous-technical/2388/helm-symbol/
set --universal tide_kubectl_icon ⎈

StefanLobbenmeierObjego avatar Jul 24 '24 08:07 StefanLobbenmeierObjego

Anyone here has any other icons they had issues with? Also could someone test the linked PR on Linux?

fisher remove ilancosman/tide@v6 fisher install StefanLobbenmeierObjego/tide@patch-1 Then reconfigured, enabled "Show many Icons": tide configure --auto --style=Lean --prompt_colors='True color' --show_time='24-hour format' --lean_prompt_height='One line' --prompt_spacing=Compact --icons='Many icons' --transient=No

StefanLobbenmeierObjego avatar Jul 25 '24 10:07 StefanLobbenmeierObjego

@StefanLobbenmeierObjego The alternative icons from your PR work for me on Arch Linux, the terminal in IntelliJ behaves properly!

sandersteenhoudt avatar Jul 26 '24 06:07 sandersteenhoudt

I feel a bit hesitant to immediately revert the icons to once that avoid the issue in Jetbrains since the current icons are nicer in my opinion (like using the real Kubernetes logo instead of a generic ship steering wheel). Ideally, Jetbrains should fix their terminal implementation to support the Nerd Font icons, but they have a very old issue that doesn't seem to be high priority. I don't think Tide should have to decrease the user experience for the majority of users that use this prompt with other terminals that have implemented proper Nerd Font support.

Maybe a better solution for this would be to have an additional step in the configuration process to opt to disable Nerd-Font icons, and instead use generic single-width unicode icons instead.

pieterrombauts avatar Jul 26 '24 08:07 pieterrombauts

@pieterrombauts I agree, @StefanLobbenmeierObjego's PR is a workaround for a bug that JetBrains should fix in their products, not a bug with Tide or its icons. I would also much rather use the default icons and I think they should not be replaced just so JetBrains IDEs play nice with them. However, having a non-functional terminal in your IDE is a PITA, so at the very least it's nice to know this workaround exists.

sandersteenhoudt avatar Jul 26 '24 08:07 sandersteenhoudt

I see, upvoted the linked youtrack issue, maybe we can get the ball rolling there 😄 i can understand that this project does not want to work around the intellij bug, so for me it is fine to just revert the icons manually.

The python icon is also broken in my iterm, maybe I have to update the font to use it?

I could also confirm that iTerm handles the new icons correctly after installing the fonts again

StefanLobbenmeierObjego avatar Jul 26 '24 10:07 StefanLobbenmeierObjego