Fix "no" when replacing with empty string (#2641)

* advance to end of found string when not replacing

* simplify search location change
This commit is contained in:
zehkira
2022-12-03 02:48:50 +01:00
committed by GitHub
parent 87ad67ada7
commit 5d3dbde698

View File

@@ -853,8 +853,7 @@ func (h *BufPane) ReplaceCmd(args []string) {
h.Cursor.Loc = searchLoc
nreplaced++
} else if !canceled && !yes {
searchLoc = locs[0]
searchLoc.X += util.CharacterCount(replace)
searchLoc = locs[1]
} else if canceled {
h.Cursor.ResetSelection()
h.Buf.RelocateCursors()