intermezzOS / kernel

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

Buffer scrolling bug fix #30

Closed WilsonGiese closed 8 years ago

WilsonGiese commented 8 years ago

This fixes the handling of next_line when we are trying to determine if the next_line should be the last line . Before the position index would not be correct if it was equal to the size of the buffer. I've also reduced the size of the buffer because it seemed to be twice as large as needed.

To see the side affect of this bug, reduce the the row count below 25 and enter enough text for scrolling logic to execute.

steveklabnik commented 8 years ago

Ah this is awesome! We had https://github.com/intermezzOS/kernel/issues/3 open to track some weirdness, this makes total sense.

steveklabnik commented 8 years ago

(And I think the * 2 was a holdover from before each cell stored both its bytes)