summaryrefslogtreecommitdiffstats
path: root/src/tui
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-04-26 15:13:08 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-04-26 15:13:08 +0900
commitcf95e44cb4ce6f42a318abba0efa77c7311c87c9 (patch)
tree58d0c5b9cc50f69485f4450fd71f4a0b5185d736 /src/tui
parent65dd2bb42947d4ede31d160214f3a4c6fdc619e1 (diff)
Add 'zero' event
Close #3263
Diffstat (limited to 'src/tui')
-rw-r--r--src/tui/tui.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tui/tui.go b/src/tui/tui.go
index b8b7ae6a..a0e0b487 100644
--- a/src/tui/tui.go
+++ b/src/tui/tui.go
@@ -94,6 +94,7 @@ const (
Load
Focus
One
+ Zero
AltBS
@@ -283,6 +284,15 @@ type Event struct {
MouseEvent *MouseEvent
}
+func (e Event) Is(types ...EventType) bool {
+ for _, t := range types {
+ if e.Type == t {
+ return true
+ }
+ }
+ return false
+}
+
type MouseEvent struct {
Y int
X int