intermezzOS / kernel

A hobby operating system, in Rust
http://intermezzos.github.io/
Apache License 2.0
1.39k stars 90 forks source link

Refactor VgaBuffer::write_byte a bit #48

Closed WilsonGiese closed 8 years ago

WilsonGiese commented 8 years ago

Simplified the scroll up procedure. Scroll up is only called once; after the byte is written and before the cursor position is set. This changes the behavior a bit, before it would scroll up if the byte being written was to be on the next position outside the buffer, now it scrolls up if the next character written will be outside the buffer. This also fixes an issue where the cursor would be hidden if the next byte position was outside the buffer.

steveklabnik commented 8 years ago

Nice! I did always feel this was a bit too complex for its own good.