ui: clean up doubling
parent
e8125b419f
commit
5a7db89b47
|
@ -97,9 +97,6 @@ func editGraffiti(state *ui.State) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// for some reason vaxis doubles all events for Press/Release so this just ignores releases
|
|
||||||
if key, ok := ev.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
|
|
||||||
vt.Update(ev)
|
vt.Update(ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -123,12 +123,9 @@ func showManpage(state *ui.State) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// for some reason vaxis doubles all events for Press/Release so this just ignores releases
|
|
||||||
if key, ok := ev.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
|
|
||||||
vt.Update(ev)
|
vt.Update(ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
func newFeels(state *ui.State) {
|
func newFeels(state *ui.State) {
|
||||||
// if $EDITOR isn't set, warn about it, and use nano
|
// if $EDITOR isn't set, warn about it, and use nano
|
||||||
|
@ -169,9 +166,6 @@ func newFeels(state *ui.State) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// for some reason vaxis doubles all events for Press/Release so this just ignores releases
|
|
||||||
if key, ok := ev.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
|
|
||||||
vt.Update(ev)
|
vt.Update(ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -133,9 +133,6 @@ func showPost(state *ui.State, post ttbp.Post) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// for some reason vaxis doubles all events for Press/Release so this just ignores releases
|
|
||||||
if key, ok := ev.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
|
|
||||||
vt.Update(ev)
|
vt.Update(ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
3
ui/ui.go
3
ui/ui.go
|
@ -25,8 +25,7 @@ type State struct {
|
||||||
|
|
||||||
func New(view View) (state State, err error) {
|
func New(view View) (state State, err error) {
|
||||||
vx, err := vaxis.New(vaxis.Options{
|
vx, err := vaxis.New(vaxis.Options{
|
||||||
DisableMouse: false,
|
DisableMouse: true,
|
||||||
CSIuBitMask: vaxis.CSIuDisambiguate | vaxis.CSIuReportEvents | vaxis.CSIuAlternateKeys | vaxis.CSIuAllKeys | vaxis.CSIuAssociatedText,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue