mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-21 06:41:00 +00:00
parent
65b5d6c5a9
commit
69f77ee2f1
1 changed files with 4 additions and 0 deletions
|
|
@ -113,6 +113,8 @@ func searchDown(r *regexp.Regexp, v *View, start, end Loc) bool {
|
|||
if match != nil {
|
||||
v.Cursor.SetSelectionStart(Loc{charPos + runePos(match[0], string(l)), i})
|
||||
v.Cursor.SetSelectionEnd(Loc{charPos + runePos(match[1], string(l)), i})
|
||||
v.Cursor.OrigSelection[0] = v.Cursor.CurSelection[0]
|
||||
v.Cursor.OrigSelection[1] = v.Cursor.CurSelection[1]
|
||||
v.Cursor.Loc = v.Cursor.CurSelection[1]
|
||||
|
||||
return true
|
||||
|
|
@ -140,6 +142,8 @@ func searchUp(r *regexp.Regexp, v *View, start, end Loc) bool {
|
|||
if match != nil {
|
||||
v.Cursor.SetSelectionStart(Loc{runePos(match[0], string(l)), i})
|
||||
v.Cursor.SetSelectionEnd(Loc{runePos(match[1], string(l)), i})
|
||||
v.Cursor.OrigSelection[0] = v.Cursor.CurSelection[0]
|
||||
v.Cursor.OrigSelection[1] = v.Cursor.CurSelection[1]
|
||||
v.Cursor.Loc = v.Cursor.CurSelection[1]
|
||||
|
||||
return true
|
||||
|
|
|
|||
Loading…
Reference in a new issue