Skip to content

Commit 03cdc06

Browse files
authored
cmdinput keybindings (#627)
1 parent 6c3e5b8 commit 03cdc06

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/models/input.ts

+7-11
Original file line numberDiff line numberDiff line change
@@ -460,22 +460,18 @@ class InputModel {
460460
}
461461

462462
shouldRenderAuxViewKeybindings(view: InputAuxViewType): boolean {
463-
if (view != null && this.getActiveAuxView() != view) {
463+
if (GlobalModel.activeMainView.get() != "session") {
464464
return false;
465465
}
466-
if (view != null && !this.getAuxViewFocus()) {
466+
if (GlobalModel.getActiveScreen()?.getFocusType() != "input") {
467467
return false;
468468
}
469-
if (view == null && this.hasFocus() && !this.getAuxViewFocus()) {
470-
return true;
471-
}
472-
if (view != null && this.getAuxViewFocus()) {
473-
return true;
474-
}
475-
if (GlobalModel.getActiveScreen().getFocusType() == "input" && GlobalModel.activeMainView.get() == "session") {
476-
return true;
469+
// (view == null) means standard cmdinput keybindings
470+
if (view == null) {
471+
return !this.getAuxViewFocus();
472+
} else {
473+
return this.getAuxViewFocus() && view == this.getActiveAuxView();
477474
}
478-
return false;
479475
}
480476

481477
@mobx.action

0 commit comments

Comments
 (0)