mirror of
https://github.com/paul-nameless/tg
synced 2024-11-22 03:43:19 +00:00
Move cursor to the correct position for unicode characters when input msg (#212)
* Move cursor to the correct position for unicode characters when input msg * Fix black formatting
This commit is contained in:
parent
20273fd068
commit
d78792e71e
1 changed files with 3 additions and 1 deletions
|
@ -116,7 +116,9 @@ class StatusView:
|
|||
line = buff[-(self.w - 1) :]
|
||||
self.win.addstr(0, 0, f"{prefix}{line}")
|
||||
|
||||
key = self.win.get_wch(0, min(len(buff + prefix), self.w - 1))
|
||||
key = self.win.get_wch(
|
||||
0, min(string_len_dwc(buff + prefix), self.w - 1)
|
||||
)
|
||||
key = ord(key)
|
||||
if key == 10: # return
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue