mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +00:00
Revert my backspace patch from before. I found a better way to handle backspaces which doesnt break backspacing in ftp.exe(and some of apps) while still fixing ncftp.exe.
svn path=/trunk/; revision=23220
This commit is contained in:
parent
c1d9e2bb6c
commit
4a6251c297
|
@ -607,8 +607,12 @@ CSR_API(CsrReadConsole)
|
||||||
&& Input->InputEvent.Event.KeyEvent.bKeyDown
|
&& Input->InputEvent.Event.KeyEvent.bKeyDown
|
||||||
&& Input->InputEvent.Event.KeyEvent.uChar.AsciiChar != '\0')
|
&& Input->InputEvent.Event.KeyEvent.uChar.AsciiChar != '\0')
|
||||||
{
|
{
|
||||||
/* backspace handling */
|
/*
|
||||||
if ('\b' == Input->InputEvent.Event.KeyEvent.uChar.AsciiChar)
|
* backspace handling - if we are in charge of echoing it then we handle it here
|
||||||
|
* otherwise we treat it like a normal char.
|
||||||
|
*/
|
||||||
|
if ('\b' == Input->InputEvent.Event.KeyEvent.uChar.AsciiChar && 0
|
||||||
|
!= (Console->Mode & ENABLE_ECHO_INPUT))
|
||||||
{
|
{
|
||||||
/* echo if it has not already been done, and either we or the client has chars to be deleted */
|
/* echo if it has not already been done, and either we or the client has chars to be deleted */
|
||||||
if (! Input->Echoed
|
if (! Input->Echoed
|
||||||
|
@ -622,14 +626,14 @@ CSR_API(CsrReadConsole)
|
||||||
i -= 2; /* if we already have something to return, just back it up by 2 */
|
i -= 2; /* if we already have something to return, just back it up by 2 */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ /* otherwise, return STATUS_NOTIFY_CLEANUP to tell client to back up its buffer */
|
||||||
/* otherwise, we will treat the backspace just like any other char and let the client decide what to do */
|
|
||||||
Console->WaitingChars--;
|
Console->WaitingChars--;
|
||||||
ConioUnlockConsole(Console);
|
ConioUnlockConsole(Console);
|
||||||
HeapFree(Win32CsrApiHeap, 0, Input);
|
HeapFree(Win32CsrApiHeap, 0, Input);
|
||||||
Request->Data.ReadConsoleRequest.NrCharactersRead++;
|
Request->Data.ReadConsoleRequest.NrCharactersRead = 0;
|
||||||
Buffer[i] = Input->InputEvent.Event.KeyEvent.uChar.AsciiChar;
|
Request->Status = STATUS_NOTIFY_CLEANUP;
|
||||||
return Request->Status;
|
return STATUS_NOTIFY_CLEANUP;
|
||||||
|
|
||||||
}
|
}
|
||||||
Request->Data.ReadConsoleRequest.nCharsCanBeDeleted--;
|
Request->Data.ReadConsoleRequest.nCharsCanBeDeleted--;
|
||||||
Input->Echoed = TRUE; /* mark as echoed so we don't echo it below */
|
Input->Echoed = TRUE; /* mark as echoed so we don't echo it below */
|
||||||
|
|
Loading…
Reference in a new issue