Add padding to relocate func (fixes weird scrolling behavior)

This commit is contained in:
Camille Scholtz
2016-05-20 17:43:26 +02:00
parent bbcd33d9fd
commit 096221fd0e
3 changed files with 7 additions and 7 deletions

View File

@@ -121,7 +121,7 @@ func Search(searchStr string, v *View, down bool) {
v.Cursor.curSelection[0] = charPos + match[0]
v.Cursor.curSelection[1] = charPos + match[1]
v.Cursor.x, v.Cursor.y = FromCharPos(charPos+match[1]-1, v.Buf)
if v.Relocate() {
if v.Relocate(4) {
v.matches = Match(v)
}
lastSearch = searchStr