Skip to content

Commit

Permalink
[fix] disable infinite down scroll - fixes #31
Browse files Browse the repository at this point in the history
  • Loading branch information
asciimoo committed Feb 25, 2017
1 parent 34e53c3 commit 7ddc409
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions wuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,15 @@ func (e *ViewEditor) Edit(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modif
return
}

// disable infinite down scroll
if key == gocui.KeyArrowDown && mod == gocui.ModNone {
_, cY := v.Cursor()
_, err := v.Line(cY)
if err != nil {
return
}
}

e.origEditor.Edit(v, key, ch, mod)
}

Expand Down

0 comments on commit 7ddc409

Please sign in to comment.