mirror of
https://github.com/felixangell/phi.git
synced 2024-09-11 15:55:25 +03:00
scrolling bounds checks
This commit is contained in:
parent
7c4706356b
commit
112cdc74d6
@ -370,6 +370,7 @@ func (b *Buffer) scrollUp() {
|
||||
}
|
||||
|
||||
func (b *Buffer) scrollDown() {
|
||||
if b.cam.y < len(b.contents) {
|
||||
// TODO move the cursor down 45 lines
|
||||
// IF the buffer exceeds the window size.
|
||||
lineScrollAmount := 10
|
||||
@ -379,6 +380,7 @@ func (b *Buffer) scrollDown() {
|
||||
b.moveDown()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// processes a key press. returns if there
|
||||
// was a key that MODIFIED the buffer.
|
||||
|
Loading…
Reference in New Issue
Block a user