mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-26 13:49:21 +08:00
disable global keybindings when repl is running
This commit is contained in:
parent
ec68b084b5
commit
35e75ba83e
7
start.go
7
start.go
@ -106,7 +106,6 @@ color_popup = "#0A0F14"
|
||||
// vim: syntax=go
|
||||
`
|
||||
|
||||
|
||||
cfg := expandTilde(config)
|
||||
|
||||
_, err := os.Stat(cfg)
|
||||
@ -219,6 +218,10 @@ func start(application *tview.Application, args Args) {
|
||||
// global keybindings are handled here
|
||||
application.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey {
|
||||
|
||||
if gomu.pages.HasPage("repl-input-popup") {
|
||||
return e
|
||||
}
|
||||
|
||||
popupName, _ := gomu.pages.GetFrontPage()
|
||||
|
||||
// disables keybindings when writing in input fields
|
||||
@ -237,7 +240,7 @@ func start(application *tview.Application, args Args) {
|
||||
|
||||
kb := string(e.Rune())
|
||||
if gomu.anko.KeybindExists("Global", kb) {
|
||||
|
||||
|
||||
err := gomu.anko.ExecKeybind("Global", kb)
|
||||
if err != nil {
|
||||
errorPopup(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user