fix: screen switch now works well with the shell and its "history"

This commit is contained in:
2024-09-11 15:51:40 +02:00
parent bc99b99c82
commit 19141e6883
4 changed files with 23 additions and 4 deletions

View File

@ -1,5 +1,6 @@
#include "ctype.h"
#include "kprintf.h"
#include "shell.h"
#include "string.h"
#include "sys/io.h"
#include "terminal.h"
@ -44,6 +45,8 @@ void terminal_set_screen(int pos)
screen = &screens[pos];
memcpy(TERM_BUF, screen->buffer, sizeof(screen->buffer));
update_cursor();
if (TERM_BUF[0] == vga_entry(' ', VGA_COLOR_WHITE))
kprintf(0, PROMPT);
}
void terminal_setcolor(uint8_t color)