diff --git a/CHANGES.md b/CHANGES.md index 9878dd5f4..18a68010b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,8 @@ - [nix] Add `pet-server` deps to flake.nix (Léo Stefanesco, #754) - [coq-lsp] Fix crash on `--help` option (Léo Stefanesco, @ejgallego, #754) + - [vscode] Fix focus race when a Coq file is in column 2 (@ejgallego, + #755, cc: #722, #725) # coq-lsp 0.1.10: Hasta el 40 de Mayo _en effect_... ---------------------------------------------------- diff --git a/editor/code/src/goals.ts b/editor/code/src/goals.ts index bad8a4644..87aec4db7 100644 --- a/editor/code/src/goals.ts +++ b/editor/code/src/goals.ts @@ -104,7 +104,11 @@ export class InfoPanel { this.panelFactory(); } else { if (!this.panel.visible) { - this.panel.reveal(2, true); + // Otherwise we create a race with the active editor! + // Careful about this. + if (window.activeTextEditor?.viewColumn !== 2) { + this.panel.reveal(2, true); + } } } }