fix hacky terminal, part 1

This commit is contained in:
aoife cassidy 2025-01-19 12:15:57 +02:00
父節點 ca476a55d3
當前提交 92b6d030a6
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 7184AC1C9835CE48
共有 3 個檔案被更改,包括 2 行新增9 行删除

查看文件

@ -81,11 +81,8 @@ 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
if key, ok := ev.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
vt.Update(ev) vt.Update(ev)
} }
}
return return
} }

查看文件

@ -72,11 +72,8 @@ 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
if key, ok := ev.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
vt.Update(ev) vt.Update(ev)
} }
}
return return
} }

查看文件

@ -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