Skip to content

Commit

Permalink
Call getLineCount in UI Thread
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Mar 29, 2023
1 parent 79055ed commit 10d3dfa
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,12 @@ public int compare(Tuple o1, Tuple o2) {

@Override
public void textChanged(TextEvent event) {
if (event.getViewerRedrawState() && fCachedTextWidget.getLineCount() != previousLineCount) {
previousLineCount= fCachedTextWidget.getLineCount();
postRedraw();
}
fCachedTextWidget.getDisplay().execute(() -> {
if (event.getViewerRedrawState() && fCachedTextWidget.getLineCount() != previousLineCount) {
previousLineCount= fCachedTextWidget.getLineCount();
postRedraw();
}
});
}
};

Expand Down

0 comments on commit 10d3dfa

Please sign in to comment.