Skip to content

Commit

Permalink
FindReplaceOverlay: update position and size while not visible eclips…
Browse files Browse the repository at this point in the history
…e-platform#2478

When changing position and/or size of the editor of a FindReplaceOverlay
while it is hidden, e.g., because another editor in the same editor
stack is active, the position and size of the overlay is not updated
accordingly. Thus, when making the editor of that overlay active again,
its position relative to the editor and size is still the same as before
another editor was set active, i.e., it is usually wrong.

With this change, the size and position of an overlay is always updated
upon resize operations of the target editor, even if the editor is not
visible.

Fixes eclipse-platform#2478
  • Loading branch information
HeikoKlare committed Nov 3, 2024
1 parent eacd0b4 commit c1c681a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void performSelectAll() {
.controlResizedAdapter(__ -> asyncExecIfOpen(FindReplaceOverlay.this::updatePlacementAndVisibility));

private void asyncExecIfOpen(Runnable operation) {
if (!containerControl.isDisposed() && containerControl.isVisible()) {
if (!containerControl.isDisposed()) {
containerControl.getDisplay().asyncExec(() -> {
if (containerControl != null || containerControl.isDisposed()) {
operation.run();
Expand Down

0 comments on commit c1c681a

Please sign in to comment.