Skip to content

Commit 6070649

Browse files
committed
fix: prevent stuck "Loading..." hover
1 parent fb5de3e commit 6070649

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/hover/FocusableBrowserInformationControl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void setInput(@Nullable Object input) {
162162
if (input instanceof AsyncHtmlHoverInput async) {
163163
this.currentAsyncToken = async.token;
164164
super.setInput(styleHtml(async.placeholderHtml));
165-
async.future.whenComplete((html, ex) -> UI.getDisplay().asyncExec(() -> {
165+
async.future.whenComplete((html, ex) -> UI.runOnUIThread(() -> {
166166
if (getShell() == null || getShell().isDisposed()) {
167167
return;
168168
}
@@ -172,14 +172,14 @@ public void setInput(@Nullable Object input) {
172172
}
173173
if (ex != null) {
174174
LanguageServerPlugin.logError(ex);
175-
dispose();
175+
super.setInput(""); //$NON-NLS-1$
176176
return;
177177
}
178178
if (html != null && !html.isBlank()) {
179179
super.setInput(styleHtml(html));
180180
} else {
181181
// No content from LS; hide placeholder
182-
dispose();
182+
super.setInput("bbb"); //$NON-NLS-1$
183183
}
184184
}));
185185
return;

0 commit comments

Comments
 (0)