Skip to content

Commit

Permalink
run fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Nov 9, 2024
1 parent d1369e2 commit 3519a79
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kernel/src/interrupts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,18 @@ extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: InterruptStac
KeyCode::ArrowLeft => {
if unsafe { BUFFER_INDEX } > 0 {
WRITER.lock().decrement_column_position();
unsafe { BUFFER_INDEX -= 1; }
unsafe {
BUFFER_INDEX -= 1;
}
}
}

KeyCode::ArrowRight => {
if unsafe { BUFFER_INDEX } < BUFFER_SIZE {
WRITER.lock().increment_column_position();
unsafe { BUFFER_INDEX += 1; }
unsafe {
BUFFER_INDEX += 1;
}
}
}

Expand Down

0 comments on commit 3519a79

Please sign in to comment.