Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IME input in wrong position #874

Open
Bryan2333 opened this issue Nov 28, 2023 · 1 comment
Open

IME input in wrong position #874

Bryan2333 opened this issue Nov 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Bryan2333
Copy link

Bryan2333 commented Nov 28, 2023

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:

  1. Clone the repository
  2. Build the example like textinput, textarea
  3. Run the program
  4. Try to use input method like Fcitx5.

Source Code
Just the provided example code

Expected behavior
The candidate box following the cursor.

Screenshots
Screenshot_20231128_164927.webp

Additional context

@meowgorithm meowgorithm changed the title Candidate box of input method is at wrong position on Linux IME input in wrong position Dec 6, 2023
@meowgorithm
Copy link
Member

meowgorithm commented Dec 6, 2023

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: charmbracelet/bubbles#361

Additional reference (see "What Can Program Authors Do Today?" near the end): https://mitchellh.com/writing/grapheme-clusters-in-terminals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants