fix terminal doubling inputs
parent
ca476a55d3
commit
c9aec29b0c
|
@ -81,10 +81,7 @@ func (view *Editor) Event(state *ui.State, event vaxis.Event) (processed bool) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// for some reason vaxis doubles all events for Press/Release so this just ignores releases
|
vt.Update(ev)
|
||||||
if key, ok := ev.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
|
|
||||||
vt.Update(ev)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
@ -72,10 +72,7 @@ func (view *Shell) Event(state *ui.State, event vaxis.Event) (processed bool) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// for some reason vaxis doubles all events for Press/Release so this just ignores releases
|
vt.Update(ev)
|
||||||
if key, ok := ev.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
|
|
||||||
vt.Update(ev)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
1
ui/ui.go
1
ui/ui.go
|
@ -25,7 +25,6 @@ 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: true,
|
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