cmdinput keybindings (#627)

This commit is contained in:
Mike Sawka 2024-04-30 18:44:40 -07:00 committed by GitHub
parent 6c3e5b8746
commit 03cdc067e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -460,22 +460,18 @@ class InputModel {
}
shouldRenderAuxViewKeybindings(view: InputAuxViewType): boolean {
if (view != null && this.getActiveAuxView() != view) {
if (GlobalModel.activeMainView.get() != "session") {
return false;
}
if (view != null && !this.getAuxViewFocus()) {
if (GlobalModel.getActiveScreen()?.getFocusType() != "input") {
return false;
}
if (view == null && this.hasFocus() && !this.getAuxViewFocus()) {
return true;
// (view == null) means standard cmdinput keybindings
if (view == null) {
return !this.getAuxViewFocus();
} else {
return this.getAuxViewFocus() && view == this.getActiveAuxView();
}
if (view != null && this.getAuxViewFocus()) {
return true;
}
if (GlobalModel.getActiveScreen().getFocusType() == "input" && GlobalModel.activeMainView.get() == "session") {
return true;
}
return false;
}
@mobx.action