mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 06:28:20 +00:00
Ring buffer iterator
This commit is contained in:
2
main.go
2
main.go
@ -284,6 +284,8 @@ func (p *program) MainUpdate() {
|
||||
var newPosNewLines int64
|
||||
w, _ := p.GridSize()
|
||||
if mouseWheelYNorm < 0 {
|
||||
// @TODO This is wrong because it deals with data as a normal array while its a ring buffer
|
||||
|
||||
newPosNewLines, _ = find_n_lines_index(p.textBuf.Data, p.scrollPos, p.scrollSpd*mouseWheelYNorm-1, int64(w))
|
||||
} else {
|
||||
newPosNewLines, _ = find_n_lines_index(p.textBuf.Data, p.scrollPos, p.scrollSpd*mouseWheelYNorm, int64(w))
|
||||
|
||||
Reference in New Issue
Block a user