Update screen.c

This commit is contained in:
MainSilent 2020-11-11 22:05:51 +03:30 committed by GitHub
parent a0677c643c
commit d2493caa90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,11 +44,13 @@ void kprint(char *message) {
kprint_at(message, -1, -1); kprint_at(message, -1, -1);
} }
void kprint_backspace() { void kprint_backspace(char key_buffer[256]) {
int offset = get_cursor_offset()-2; if (strlen(key_buffer) != 0) {
int row = get_offset_row(offset); int offset = get_cursor_offset()-2;
int col = get_offset_col(offset); int row = get_offset_row(offset);
print_char(0x08, col, row, WHITE_ON_BLACK); int col = get_offset_col(offset);
print_char(0x08, col, row, WHITE_ON_BLACK);
}
} }