monitor: Don't allow backspacing past the start of the prompt
This commit is contained in:
parent
3247a29d2a
commit
e38d1df807
|
@ -56,6 +56,10 @@ monitor_shell_key_down_event_enter:
|
||||||
call print_string_to_monitor
|
call print_string_to_monitor
|
||||||
ret
|
ret
|
||||||
monitor_shell_key_down_event_backspace:
|
monitor_shell_key_down_event_backspace:
|
||||||
|
; check if we are already at the start of the prompt
|
||||||
|
mov r1, [MONITOR_SHELL_TEXT_BUF_PTR]
|
||||||
|
cmp r1, MONITOR_SHELL_TEXT_BUF_BOTTOM
|
||||||
|
iflteq ret
|
||||||
; delete the last character from the screen, and pop the last character from the buffer
|
; delete the last character from the screen, and pop the last character from the buffer
|
||||||
mov r0, 8 ; backspace character
|
mov r0, 8 ; backspace character
|
||||||
call print_character_to_monitor
|
call print_character_to_monitor
|
||||||
|
|
Loading…
Reference in New Issue
Block a user