ui: change events to have "Event" suffixed, not prefixed

Match the Go error naming convention (FooError).

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-21 17:08:34 +02:00
parent de5d5e19f5
commit 0b6dd4efd9
12 changed files with 64 additions and 64 deletions
+4 -4
View File
@@ -111,9 +111,9 @@ func (e *Editor) Next() (EditorEvent, bool) {
}
e.blinkStart = e.Config.Now
switch ke := ke.(type) {
case key.Focus:
case key.FocusEvent:
e.focused = ke.Focus
case key.Chord:
case key.ChordEvent:
if !e.focused {
break
}
@@ -126,7 +126,7 @@ func (e *Editor) Next() (EditorEvent, bool) {
stop = true
scrollTo = true
}
case key.Edit:
case key.EditEvent:
stop = true
scrollTo = true
e.append(ke.Text)
@@ -529,7 +529,7 @@ func (e *Editor) scrollToCaret() {
}
}
func (e *Editor) command(k key.Chord) bool {
func (e *Editor) command(k key.ChordEvent) bool {
switch k.Name {
case key.NameReturn, key.NameEnter:
if !e.SingleLine {