mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
Limit selection to window border
svn path=/trunk/; revision=19897
This commit is contained in:
parent
72510b8edb
commit
949a0178cf
1 changed files with 8 additions and 0 deletions
|
@ -725,7 +725,15 @@ GuiConsoleMouseMove(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
rc.left = GuiData->SelectionStart.x;
|
rc.left = GuiData->SelectionStart.x;
|
||||||
rc.top = GuiData->SelectionStart.y;
|
rc.top = GuiData->SelectionStart.y;
|
||||||
rc.right = (pt.x >= 0 ? (pt.x / GuiData->CharWidth) + 1 : 0);
|
rc.right = (pt.x >= 0 ? (pt.x / GuiData->CharWidth) + 1 : 0);
|
||||||
|
if (Console->Size.X < rc.right)
|
||||||
|
{
|
||||||
|
rc.right = Console->Size.X;
|
||||||
|
}
|
||||||
rc.bottom = (pt.y >= 0 ? (pt.y / GuiData->CharHeight) + 1 : 0);
|
rc.bottom = (pt.y >= 0 ? (pt.y / GuiData->CharHeight) + 1 : 0);
|
||||||
|
if (Console->Size.Y < rc.bottom)
|
||||||
|
{
|
||||||
|
rc.bottom = Console->Size.Y;
|
||||||
|
}
|
||||||
|
|
||||||
/* exchange left/top with right/bottom if required */
|
/* exchange left/top with right/bottom if required */
|
||||||
if(rc.left >= rc.right)
|
if(rc.left >= rc.right)
|
||||||
|
|
Loading…
Reference in a new issue