mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-25 02:10:26 +00:00
parent
c19dce87e4
commit
3516c8a9a6
1 changed files with 2 additions and 1 deletions
|
|
@ -805,7 +805,7 @@ func (h *BufPane) ReplaceCmd(args []string) {
|
|||
return l.GreaterEqual(start) && l.LessEqual(end)
|
||||
}
|
||||
|
||||
searchLoc := start
|
||||
searchLoc := h.Cursor.Loc
|
||||
var doReplacement func()
|
||||
doReplacement = func() {
|
||||
locs, found, err := h.Buf.FindNext(search, start, end, searchLoc, true, !noRegex)
|
||||
|
|
@ -816,6 +816,7 @@ func (h *BufPane) ReplaceCmd(args []string) {
|
|||
if !found || !inRange(locs[0]) || !inRange(locs[1]) {
|
||||
h.Cursor.ResetSelection()
|
||||
h.Buf.RelocateCursors()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue