zed icon indicating copy to clipboard operation
zed copied to clipboard

Right-to-left text rendering can be triggered in the UI by user supplied input

Open dwt opened this issue 8 months ago • 2 comments

Summary

My git username contains a unicode line direction change character, to check how software handles this.

Zed does not, it leads to this hilarious result:

Image

Steps to trigger the problem:

  1. Set your username to something like this in the git config
    [user]
     name = ‮rekcäH nitraM‮
    
  2. Enjoy the breakage everywhere

Actual Behavior:

Image

Expected Behavior:

22 hours ago should not be inverted, as the altered state from the username has leaked into the user interface of zed.

Zed Version and System Specs

Zed: v0.179.5 (Zed) OS: macOS 15.4.0 Memory: 36 GiB Architecture: aarch64

dwt avatar Apr 02 '25 17:04 dwt

:D fun one. We don't even support editing files containing RTL characters right now, so probably won't get to this soon...

How do UIs typically work around this? I guess by using separate calls to the font rendering engine for each field.

ConradIrwin avatar May 06 '25 12:05 ConradIrwin

@ConradIrwin That sounds about right. One could also try to filter, but that seems like a dark ally one does not want to venture in.

dwt avatar May 11 '25 16:05 dwt

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 09:11 github-actions[bot]

Image

Still happens.

dwt avatar Nov 25 '25 07:11 dwt