Set move boundary to after the prompt

This commit is contained in:
Yash Karandikar 2021-09-17 13:09:20 -05:00
parent ce99a355f3
commit fcb457efff
3 changed files with 10 additions and 8 deletions

View file

@ -96,7 +96,7 @@ extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: InterruptStac
let col = writer.column_position;
let row = crate::vga_buffer::BUFFER_HEIGHT - 1;
if col != 0 {
if col != 4 {
crate::vga_buffer::move_cursor((col as u16) - 1, row as u16);
writer.column_position -= 1;
}

View file

@ -2,11 +2,13 @@ use crate::println;
use crate::print;
pub fn evaluate(command: &str) {
let res = command.trim();
if res != "" {
println!();
println!();
println!("[ {:#?} ]", res);
print!(">>> ");
if let Some(stripped) = command.strip_prefix(">>> ") {
let res = stripped.trim();
if res != "" {
println!();
println!();
println!("[ {} ]", res);
print!(">>> ");
}
}
}

View file

@ -157,7 +157,7 @@ pub fn backspace() {
let row = BUFFER_HEIGHT - 1;
let col = writer.column_position;
let color_code = writer.color_code;
if col != 0 {
if col != 4 {
writer.buffer.chars[row][col - 1].write(ScreenChar {
ascii_character: b' ',
color_code