mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-26 13:49:21 +08:00
fix blocking tab key if popup shows up
This commit is contained in:
parent
decacd991a
commit
dbb9fc6940
16
start.go
16
start.go
@ -144,11 +144,18 @@ func start(application *tview.Application, args Args) {
|
||||
|
||||
application.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
|
||||
|
||||
popupName, _ := gomu.pages.GetFrontPage()
|
||||
|
||||
// disables keybindings when writing in input fields
|
||||
if strings.Contains(popupName, "-input-") {
|
||||
return event
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
// cycle through each section
|
||||
case tcell.KeyTAB:
|
||||
|
||||
if gomu.pages.GetPageCount() > 1 {
|
||||
if strings.Contains(popupName, "confirmation-") {
|
||||
return event
|
||||
}
|
||||
|
||||
@ -156,13 +163,6 @@ func start(application *tview.Application, args Args) {
|
||||
|
||||
}
|
||||
|
||||
name, _ := gomu.pages.GetFrontPage()
|
||||
|
||||
// disables keybindings when writing in input fields
|
||||
if strings.Contains(name, "-input-") {
|
||||
return event
|
||||
}
|
||||
|
||||
switch event.Rune() {
|
||||
case 'q':
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user