1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

term.ui: add support for multi byte/UTF-8 events (#13274)

This commit is contained in:
Larpon
2022-01-25 13:46:48 +01:00
committed by GitHub
parent ca1f675dba
commit 28ddd8440a
2 changed files with 53 additions and 3 deletions

View File

@ -6,6 +6,9 @@ module ui
struct ExtraContext {
mut:
read_buf []byte
// read_all_bytes causes all the raw bytes to be read as one event unit.
// This is cruicial for UTF-8 support since Unicode codepoints can span several bytes.
read_all_bytes bool = true
}
const ctx_ptr = &Context(0)