Skip to content

Commit 292bf82

Browse files
authored
Fix editor focus condition for interface keybindings (#1983)
* Fix editor focus condition for interface keybindings The when clauses for several keybindings were missing `editorTextFocus` conditions for `ocaml.interface` due to operator precedence. This caused the keybindings to be active even when the editor did not have focus for interface files. Signed-off-by: Sora Morimoto <[email protected]> * Update CHANGELOG.md Signed-off-by: Sora Morimoto <[email protected]> --------- Signed-off-by: Sora Morimoto <[email protected]>
1 parent 45fb6fa commit 292bf82

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
- Fix editor focus condition for interface file keybindings. Previously,
6+
keybindings for `ocaml.interface` files were active even when the editor
7+
did not have focus due to operator precedence in the when clauses. (#1983)
8+
59
## 1.32.3
610

711
- Fix utop detection by using `-version` flag instead of `--version` to align

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -837,12 +837,12 @@
837837
{
838838
"command": "ocaml.reveal-ast-node",
839839
"key": "Alt+N",
840-
"when": "editorTextFocus && editorLangId == ocaml || editorLangId == ocaml.interface "
840+
"when": "editorTextFocus && editorLangId == ocaml || editorTextFocus && editorLangId == ocaml.interface"
841841
},
842842
{
843843
"command": "ocaml.switch-hover-mode",
844844
"key": "Alt+H",
845-
"when": "editorTextFocus && editorLangId == ocaml || editorLangId == ocaml.interface "
845+
"when": "editorTextFocus && editorLangId == ocaml || editorTextFocus && editorLangId == ocaml.interface"
846846
},
847847
{
848848
"command": "ocaml.search-by-type",
@@ -852,17 +852,17 @@
852852
{
853853
"command": "ocaml.type-selection",
854854
"key": "Alt+T",
855-
"when": "editorTextFocus && editorLangId == ocaml || editorLangId == ocaml.interface"
855+
"when": "editorTextFocus && editorLangId == ocaml || editorTextFocus && editorLangId == ocaml.interface"
856856
},
857857
{
858858
"command": "ocaml.type-previous-selection",
859859
"key": "Shift+Alt+T",
860-
"when": "editorTextFocus && editorLangId == ocaml || editorLangId == ocaml.interface"
860+
"when": "editorTextFocus && editorLangId == ocaml || editorTextFocus && editorLangId == ocaml.interface"
861861
},
862862
{
863863
"command": "ocaml.augment-selection-type-verbosity",
864864
"key": "Alt+V",
865-
"when": "editorTextFocus && editorLangId == ocaml || editorLangId == ocaml.interface"
865+
"when": "editorTextFocus && editorLangId == ocaml || editorTextFocus && editorLangId == ocaml.interface"
866866
}
867867
],
868868
"languages": [

0 commit comments

Comments
 (0)