1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-15 01:34:26 +02:00

Bump gocui

This commit is contained in:
Stefan Haller
2023-08-02 11:34:01 +02:00
parent 4aca854b59
commit c5acbb6c7c
6 changed files with 44 additions and 25 deletions

View File

@ -154,18 +154,20 @@ type gocuiEventType uint8
// The 'Mod', 'Key' and 'Ch' fields are valid if 'Type' is 'eventKey'.
// The 'MouseX' and 'MouseY' fields are valid if 'Type' is 'eventMouse'.
// The 'Width' and 'Height' fields are valid if 'Type' is 'eventResize'.
// The 'Focused' field is valid if 'Type' is 'eventFocus'.
// The 'Err' field is valid if 'Type' is 'eventError'.
type GocuiEvent struct {
Type gocuiEventType
Mod Modifier
Key Key
Ch rune
Width int
Height int
Err error
MouseX int
MouseY int
N int
Type gocuiEventType
Mod Modifier
Key Key
Ch rune
Width int
Height int
Err error
MouseX int
MouseY int
Focused bool
N int
}
// Event types.
@ -174,6 +176,7 @@ const (
eventKey
eventResize
eventMouse
eventFocus
eventInterrupt
eventError
eventRaw
@ -368,6 +371,11 @@ func (g *Gui) pollEvent() GocuiEvent {
Ch: 0,
Mod: mouseMod,
}
case *tcell.EventFocus:
return GocuiEvent{
Type: eventFocus,
Focused: tev.Focused,
}
default:
return GocuiEvent{Type: eventNone}
}