Correct Backspace behavior in input dialog
This commit is contained in:
parent
72a832f190
commit
0fa4a175e0
@ -856,9 +856,9 @@ BlDisplayInputDialog(IN PWCHAR Caption,
|
|||||||
/* Check if buffer is not empty */
|
/* Check if buffer is not empty */
|
||||||
if(InputFieldLength > 0 && TextPosition > 0 && TextPosition <= InputFieldLength)
|
if(InputFieldLength > 0 && TextPosition > 0 && TextPosition <= InputFieldLength)
|
||||||
{
|
{
|
||||||
/* Delete character */
|
/* Move memory to overwrite the character to the left of the cursor */
|
||||||
RtlMoveMemory(InputFieldBuffer + TextPosition, InputFieldBuffer + TextPosition + 1,
|
RtlMoveMemory(InputFieldBuffer + TextPosition - 1, InputFieldBuffer + TextPosition,
|
||||||
(InputFieldLength - TextPosition) * sizeof(WCHAR));
|
(InputFieldLength - TextPosition + 1) * sizeof(WCHAR));
|
||||||
|
|
||||||
/* Decrement length, position and null terminate string */
|
/* Decrement length, position and null terminate string */
|
||||||
TextPosition--;
|
TextPosition--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user