mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[CONSRV]
Definitely fix "Select All" functionality (see r59811). svn path=/trunk/; revision=60623
This commit is contained in:
parent
98060c28c8
commit
073f1929a8
1 changed files with 24 additions and 4 deletions
|
@ -318,13 +318,33 @@ GuiConsoleHandleSysMenuCommand(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM
|
|||
SIZE_T Length = 0;
|
||||
|
||||
/*
|
||||
* We select all the characters from line 1 to
|
||||
* the line where the cursor is positioned.
|
||||
* The selection area extends to the whole screen buffer's width.
|
||||
*/
|
||||
Console->Selection.dwSelectionAnchor.X = 0;
|
||||
Console->Selection.dwSelectionAnchor.Y = 0;
|
||||
Console->dwSelectionCursor.X = ActiveBuffer->ViewSize.X - 1;
|
||||
Console->dwSelectionCursor.Y = ActiveBuffer->CursorPosition.Y;
|
||||
Console->dwSelectionCursor.X = ActiveBuffer->ScreenBufferSize.X - 1;
|
||||
|
||||
/*
|
||||
* Determine whether the selection must extend to just some part
|
||||
* (for text-mode screen buffers) or to all of the screen buffer's
|
||||
* height (for graphics ones).
|
||||
*/
|
||||
if (GetType(ActiveBuffer) == TEXTMODE_BUFFER)
|
||||
{
|
||||
/*
|
||||
* We select all the characters from the first line
|
||||
* to the line where the cursor is positioned.
|
||||
*/
|
||||
Console->dwSelectionCursor.Y = ActiveBuffer->CursorPosition.Y;
|
||||
}
|
||||
else /* if (GetType(ActiveBuffer) == GRAPHICS_BUFFER) */
|
||||
{
|
||||
/*
|
||||
* We select all the screen buffer area.
|
||||
*/
|
||||
Console->dwSelectionCursor.Y = ActiveBuffer->ScreenBufferSize.Y - 1;
|
||||
}
|
||||
|
||||
Console->Selection.dwFlags |= CONSOLE_SELECTION_IN_PROGRESS | CONSOLE_MOUSE_SELECTION;
|
||||
GuiConsoleUpdateSelection(Console, &Console->dwSelectionCursor);
|
||||
|
||||
|
|
Loading…
Reference in a new issue