Fix find where the match indicies are the same

Fixes #113
This commit is contained in:
Zachary Yedidia 2016-05-17 12:36:41 -04:00
parent bcc5931165
commit 213bb6fabe

View file

@ -111,6 +111,10 @@ func Search(searchStr string, v *View, down bool) {
match = matches[0]
}
if match[0] == match[1] {
return
}
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)