Skip to content

Commit

Permalink
Fix #70: Completion list can be 'dirty' before you type something to …
Browse files Browse the repository at this point in the history
…trigger autocomopletion (@hshafie)
  • Loading branch information
bobbylight committed Jan 22, 2022
1 parent 63300b5 commit a800f31
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ public void setVisible(boolean visible) {
super.setVisible(visible);

// Some languages, such as Java, can use quite a lot of memory
// when displaying hundreds of completion choices. We pro-actively
// when displaying hundreds of completion choices. We proactively
// clear our list model here to make them available for GC.
// Otherwise, they stick around, and consider the following: a
// user starts code-completion for Java 5 SDK classes, then hides
Expand All @@ -764,6 +764,9 @@ public void setVisible(boolean visible) {
lastSelection = list.getSelectedValue();
model.clear();
}
else {
list.repaint(); // https://github.com/bobbylight/AutoComplete/issues/70
}

// Must set descWindow's visibility one way or the other each time,
// because of the way child JWindows' visibility is handled - in
Expand Down

0 comments on commit a800f31

Please sign in to comment.