Skip to content

Commit

Permalink
fix: the cursor will flicker one frame to its previous position (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 authored Sep 26, 2023
1 parent c5ea228 commit b422187
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ class _BlockSelectionAreaState extends State<BlockSelectionArea> {
});
}
}
} else if (prevBlockRect != null ||
prevSelectionRects != null ||
prevCursorRect != null) {
setState(() {
prevBlockRect = null;
prevSelectionRects = null;
prevCursorRect = null;
});
}

WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
Expand Down

0 comments on commit b422187

Please sign in to comment.