Move cursor with search selection

Fixes #212
This commit is contained in:
Zachary Yedidia 2016-08-18 19:09:48 -07:00
parent eb27d65d24
commit 39645d4bfd

View file

@ -127,6 +127,7 @@ func Search(searchStr string, v *View, down bool) {
v.Cursor.CurSelection[0] = FromCharPos(charPos+runePos(match[0], str), v.Buf)
v.Cursor.CurSelection[1] = FromCharPos(charPos+runePos(match[1], str), v.Buf)
v.Cursor.Loc = v.Cursor.CurSelection[1]
if v.Relocate() {
v.matches = Match(v)
}