Summary
First off, love the concept of spice-edit! The idea that in the age of AI agents we don't need to memorize tons of hotkeys and can just point-and-click in the terminal is brilliant.
However, I noticed that CJK (Chinese/Japanese/Korean) characters are not rendering correctly. It appears that every other character is being dropped/hidden, likely because CJK characters are "wide characters" that occupy 2 terminal columns, but spice-edit seems to be treating them as single-width.
Steps to Reproduce
- Create a file with a CJK filename and CJK content:
echo "中文测试" > /tmp/中文测试.txt
- Open the directory in spice-edit:
Expected Behavior
- Filename in explorer:
中文测试.txt
- File content:
中文测试
Actual Behavior
- Filename in explorer:
中 测.txt (2nd and 4th characters missing)
- File content:
中 测 (same issue)
It seems like the width calculation assumes each character is 1 column wide, but CJK characters are 2 columns wide (so-called "fullwidth" or "wide" characters). This causes the rendering to consume the space of the next character.
Environment
- macOS
- Terminal: Kitty (but likely reproducible in any terminal)
- Locale: UTF-8
Possible Cause
Most terminal UI libraries need to use a Unicode width library (e.g., Go's golang.org/x/text/width or go-runewidth) to correctly calculate the display width of characters. CJK characters have East_Asian_Width property of W (Wide) or F (Fullwidth), meaning they take 2 cells in a terminal.
Thanks for the great project!
Summary
First off, love the concept of spice-edit! The idea that in the age of AI agents we don't need to memorize tons of hotkeys and can just point-and-click in the terminal is brilliant.
However, I noticed that CJK (Chinese/Japanese/Korean) characters are not rendering correctly. It appears that every other character is being dropped/hidden, likely because CJK characters are "wide characters" that occupy 2 terminal columns, but spice-edit seems to be treating them as single-width.
Steps to Reproduce
Expected Behavior
中文测试.txt中文测试Actual Behavior
中 测.txt(2nd and 4th characters missing)中 测(same issue)It seems like the width calculation assumes each character is 1 column wide, but CJK characters are 2 columns wide (so-called "fullwidth" or "wide" characters). This causes the rendering to consume the space of the next character.
Environment
Possible Cause
Most terminal UI libraries need to use a Unicode width library (e.g., Go's
golang.org/x/text/widthorgo-runewidth) to correctly calculate the display width of characters. CJK characters haveEast_Asian_Widthproperty ofW(Wide) orF(Fullwidth), meaning they take 2 cells in a terminal.Thanks for the great project!