mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove preview artifacts before deciding we don't want to show the new preview (e.g. there's no selection)
This commit is contained in:
@@ -89,12 +89,15 @@ public class CompletionPreview implements Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
final EditorImpl editor = getEditorImpl();
|
||||
editor.setCustomImage(null);
|
||||
repaintCaretLine();
|
||||
|
||||
LookupElement item = myLookup.getCurrentItem();
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final EditorImpl editor = getEditorImpl();
|
||||
if (editor.getSelectionModel().hasSelection() || editor.getSelectionModel().hasBlockSelection()) {
|
||||
return;
|
||||
}
|
||||
@@ -116,7 +119,6 @@ public class CompletionPreview implements Disposable {
|
||||
}
|
||||
|
||||
|
||||
editor.setCustomImage(null);
|
||||
BufferedImage previewImage = createPreviewImage(text.substring(prefixLength));
|
||||
editor.setCustomImage(Pair.create(getCaretPoint(), previewImage));
|
||||
repaintCaretLine();
|
||||
|
||||
Reference in New Issue
Block a user