veeso/tui-realm

[BUG] - Issue when input chinese characters

tramhao opened this issue · 2 comments

Description

Firstly thanks so much for your great work. I just started learning rust and tui is my interested area. When I run the demo code, I can input english without problem, but when input chinese, it can display all right, but the cursor is not moving correctly. I believe that is because one character in chinese is 2 letter wide.

Steps to reproduce

cargo run demo.rs

Expected behaviour

cursor moving to the end of the input string, not in the middle.

Environment

  • OS: linux
  • Architecture: x86_64
  • Rust version: 1.52.1
  • tui-realm version: 0.3.0

Additional information

Noting at this moment.

veeso commented

You're welcome, thank you for reporting the issue!

I should have fixed this. Try with the new 0.3.1 version 😉

Yes, I confirm that 0.3.1 fixed this issue. Thanks!