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

all: update assoc syntax (#8274)

This commit is contained in:
Daniel Däschle
2021-01-22 23:24:48 +01:00
committed by GitHub
parent 12897d1e2b
commit dbf84520f1
30 changed files with 138 additions and 75 deletions

View File

@@ -274,8 +274,8 @@ fn single_char(buf string) &Event {
// special handling for `ctrl + letter`
// TODO: Fix assoc in V and remove this workaround :/
// 1 ... 26 { event = { event | code: KeyCode(96 | ch), modifiers: ctrl } }
// 65 ... 90 { event = { event | code: KeyCode(32 | ch), modifiers: shift } }
// 1 ... 26 { event = Event{ ...event, code: KeyCode(96 | ch), modifiers: ctrl } }
// 65 ... 90 { event = Event{ ...event, code: KeyCode(32 | ch), modifiers: shift } }
// The bit `or`s here are really just `+`'s, just written in this way for a tiny performance improvement
@@ -330,7 +330,6 @@ fn escape_sequence(buf_ string) (&Event, int) {
if buf.len == 1 {
c := single_char(buf)
// return { c | modifiers: c.modifiers | alt }, 2
return &Event{
typ: c.typ