Skip to content

Commit 298756c

Browse files
committed
fix backspace
1 parent cf61ac4 commit 298756c

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ RtlCliListDirectory(VOID)
361361
if (++i > 20)
362362
{
363363
i = 0;
364-
RtlCliDisplayString("Continue listing (Y/N):");
364+
RtlCliDisplayString("Continue listing (y/n):");
365365
while (TRUE)
366366
{
367367
c = RtlCliGetChar(hKeyboard);

input.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,18 @@ RtlCliGetLine(IN HANDLE hDriver)
279279
//
280280
if (CurrentPosition)
281281
{
282-
// This was a backspace. NtDisplayString does not handle this, so
283-
// we unfortunately have to rely on a hack. First we erase the
284-
// entire line.
282+
// NtDisplayString does not properly handle backspace, so
283+
// we unfortunately have to rely on a hack.
285284
//
285+
// We have to call in the display subsystem to redisplay the
286+
// current text buffer and replace last character with space.
287+
286288
RtlCliPutChar('\r');
289+
RtlClipBackspace();
290+
291+
RtlCliPutChar(' ');
287292

288-
//
289-
// Now we have to call in the display subsystem to redisplay the
290-
// current text buffer. (NOT the current line input buffer!)
291-
//
293+
RtlCliPutChar('\r');
292294
RtlClipBackspace();
293295

294296
//

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ HANDLE hKeyboard;
3434
HANDLE hHeap;
3535
HANDLE hKey;
3636

37-
#define __NCLI_VER__ "0.12 x86"
37+
#define __NCLI_VER__ "0.13.0 x86"
3838

3939
WCHAR *helpstr[] =
4040
{

0 commit comments

Comments
 (0)