fix: the cursor will flicker one frame to its previous position (#506)

This commit is contained in:
Lucas.Xu 2023-09-26 14:36:30 +08:00 • committed by GitHub
commit b422187503
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {