Author: hbelusca
Date: Thu Apr 10 20:24:49 2014
New Revision: 62700
URL:
http://svn.reactos.org/svn/reactos?rev=62700&view=rev
Log:
[CONSRV]
Fix Insert mode.
Modified:
trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c
trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c
trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c
trunk/reactos/win32ss/user/winsrv/consrv/lineinput.c
trunk/reactos/win32ss/user/winsrv/consrv/settings.c
Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1] Thu Apr 10
20:24:49 2014
@@ -260,7 +260,7 @@
Console->LineComplete = FALSE;
Console->LineUpPressed = FALSE;
- Console->LineInsertToggle = 0;
+ Console->LineInsertToggle = Console->InsertMode;
Console->LineWakeupMask = ReadControl->dwCtrlWakeupMask;
Console->LineSize = ReadControl->nInitialChars;
Console->LinePos = Console->LineSize;
Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1] Thu Apr 10
20:24:49 2014
@@ -569,7 +569,8 @@
Console->InsertMode = ConsoleInfo->InsertMode;
Console->LineBuffer = NULL;
Console->LineMaxSize = Console->LineSize = Console->LinePos = 0;
- Console->LineComplete = Console->LineUpPressed = Console->LineInsertToggle =
FALSE;
+ Console->LineComplete = Console->LineUpPressed = FALSE;
+ Console->LineInsertToggle = Console->InsertMode;
// LineWakeupMask
// FIXME: This is terminal-specific !! VV
Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] Thu Apr 10
20:24:49 2014
@@ -298,7 +298,7 @@
{
DWORD Size = (Console->ActiveBuffer->CursorInfo.dwSize * Scale + 99) / 100;
/* If line input in progress, perhaps adjust for insert toggle */
- if (Console->LineBuffer && !Console->LineComplete &&
Console->LineInsertToggle)
+ if (Console->LineBuffer && !Console->LineComplete &&
(Console->InsertMode ? !Console->LineInsertToggle : Console->LineInsertToggle))
return (Size * 2 <= Scale) ? (Size * 2) : (Size / 2);
return Size;
}
Modified: trunk/reactos/win32ss/user/winsrv/consrv/lineinput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/lineinput.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/lineinput.c [iso-8859-1] Thu Apr 10 20:24:49
2014
@@ -444,8 +444,8 @@
else
{
/* Normal character */
- BOOL Overstrike = Console->LineInsertToggle && Console->LinePos
!= Console->LineSize;
- LineInputEdit(Console, Overstrike, 1, &KeyEvent->uChar.UnicodeChar);
+ BOOL Overstrike = !Console->LineInsertToggle &&
(Console->LinePos != Console->LineSize);
+ LineInputEdit(Console, (Overstrike ? 1 : 0), 1,
&KeyEvent->uChar.UnicodeChar);
}
}
}
Modified: trunk/reactos/win32ss/user/winsrv/consrv/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/settings.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/settings.c [iso-8859-1] Thu Apr 10 20:24:49
2014
@@ -267,17 +267,17 @@
}
else if (!wcscmp(szValueName, L"HistoryNoDup"))
{
- ConsoleInfo->HistoryNoDup = (BOOLEAN)Value;
+ ConsoleInfo->HistoryNoDup = !!Value;
RetVal = TRUE;
}
else if (!wcscmp(szValueName, L"QuickEdit"))
{
- ConsoleInfo->QuickEdit = (BOOLEAN)Value;
+ ConsoleInfo->QuickEdit = !!Value;
RetVal = TRUE;
}
else if (!wcscmp(szValueName, L"InsertMode"))
{
- ConsoleInfo->InsertMode = (BOOLEAN)Value;
+ ConsoleInfo->InsertMode = !!Value;
RetVal = TRUE;
}
else if (!wcscmp(szValueName, L"ScreenBufferSize"))
@@ -421,7 +421,7 @@
memcpy(ConsoleInfo->Colors, s_Colors, sizeof(s_Colors));
- // ConsoleInfo->CodePage;
+ ConsoleInfo->CodePage = 0;
ConsoleInfo->ConsoleTitle[0] = L'\0';