Improve conhost CPU usage during text selection (#11634)

This commit is contained in:
Leonard Hecker 2021-10-28 14:08:53 +02:00 committed by GitHub
parent 8560b4adfb
commit 5bc094e12a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,6 +255,14 @@ void Selection::ExtendSelection(_In_ COORD coordBufferPos)
srNewSelection.Top = _coordSelectionAnchor.Y;
}
// This function is called on WM_MOUSEMOVE.
// Prevent triggering an invalidation just because the mouse moved
// in the same cell without changing the actual (visible) selection.
if (_srSelectionRect == srNewSelection)
{
return;
}
// call special update method to modify the displayed selection in-place
// NOTE: Using HideSelection, editing the rectangle, then ShowSelection will cause flicker.
//_PaintUpdateSelection(&srNewSelection);