Set move boundary to after the prompt
This commit is contained in:
parent
ce99a355f3
commit
fcb457efff
|
@ -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;
|
||||
}
|
||||
|
|
14
src/shell.rs
14
src/shell.rs
|
@ -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!(">>> ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue