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

term.ui: native Windows console implementation (#8359)

This commit is contained in:
spaceface
2021-01-27 13:52:39 +01:00
committed by GitHub
parent 2ada7b730e
commit e233911a7b
8 changed files with 468 additions and 90 deletions

View File

@ -505,6 +505,9 @@ fn event(e &tui.Event, x voidptr) {
.escape {
exit(0)
}
.enter {
buffer.put('\n')
}
.backspace {
buffer.del(-1)
}
@ -552,8 +555,8 @@ fn event(e &tui.Event, x voidptr) {
if e.code == .s {
a.save()
}
} else if e.modifiers in [tui.shift, 0] {
buffer.put(e.ascii.str())
} else if e.modifiers in [tui.shift, 0] && e.code != .null {
buffer.put(e.ascii.ascii_str())
}
}
else {