Skip to content

Commit

Permalink
[code] Fix focus race when a Coq file is in column 2
Browse files Browse the repository at this point in the history
Continuation / fix of #722, #725
  • Loading branch information
ejgallego committed Jun 5, 2024
1 parent 899f479 commit 9a654ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_...
----------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion editor/code/src/goals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 9a654ee

Please sign in to comment.