This commit is contained in:
Zachary Yedidia
2020-06-17 23:14:03 -04:00
2 changed files with 3 additions and 2 deletions

View File

@@ -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
}

View File

@@ -80,7 +80,7 @@ can change it!
| Ctrl-z | Undo |
| Ctrl-y | Redo |
| Alt-UpArrow | Move current line or selected lines up |
| Alt-DownArrow | Move current line of selected lines down |
| Alt-DownArrow | Move current line or selected lines down |
| Alt-Backspace or Alt-Ctrl-h | Delete word left |
| Ctrl-a | Select all |