-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Buggy Unicode Support #293
Comments
Reference |
Sorry for the confusion. I've just confirmed that it’s actually a bug on the iamb side. I was able to create a small PoC and patch for it. @@ -28,7 +28,7 @@ impl State {
}
fn cursor(&self) -> u16 {
- self.idx_chars as u16
+ self.input[..self.idx_bytes()].width_cjk() as u16
}
} Before: After: Reference |
@ulyssa I’m willing to fix this issue on my own, but I’m not familiar with the iamb codebase. Could you give me a rough hint on where I should start? |
@simnalamburt thank you for looking into this! You will want to update how |
Thanks for the guide :) Fixed it Reference |
The cursor does not align correctly with user input when typing certain Unicode characters, such as Chinese characters or emojis. This issue appears to be caused by the presence of certain Unicode characters in the buffer, which results in get_term_cursor() returning an incorrect value.
The text was updated successfully, but these errors were encountered: