bubbletea
bubbletea copied to clipboard
IME input in wrong position
Describe the bug Candidate window of input method is at wrong position on Linux. The window is always at the left bottom side of the application.
Setup Please complete the following information along with version numbers, if applicable.
- OS: Arch Linux with KDE Plasma Wayland
- Shell: fish
- Terminal Emulator: konsole
- Terminal Multiplexer: none
To Reproduce Steps to reproduce the behavior:
- Clone the repository
- Build the example like textinput, textarea
- Run the program
- Try to use input method like Fcitx5.
Source Code Just the provided example code
Expected behavior The candidate box following the cursor.
Screenshots
Additional context
Thanks for the report! This appears to be happening because Bubble Tea keeps the cursor in the lower left position while the various input types in Bubbles render a virtual (simulated) cursor. To solve for this we'll need some changes to the renderer, a low level cursor API, and some updates in Bubbles.
Related: https://github.com/charmbracelet/bubbles/issues/361
Additional reference (see "What Can Program Authors Do Today?" near the end): https://mitchellh.com/writing/grapheme-clusters-in-terminals