]> git.lizzy.rs Git - micro.git/blobdiff - cmd/micro/search.go
Fix crash
[micro.git] / cmd / micro / search.go
index af5ceefd92f22b713ef2e7c6091b7542bc6dfbde..227e3af9e370141dd09722803680436208eb5e1a 100644 (file)
@@ -121,8 +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)
-       scrollmargin := int(settings["scrollmargin"].(float64))
-       if v.Relocate(scrollmargin) {
+       if v.Relocate() {
                v.matches = Match(v)
        }
        lastSearch = searchStr