diff --git a/internal/action/command.go b/internal/action/command.go index 90792a26..7f9062e5 100644 --- a/internal/action/command.go +++ b/internal/action/command.go @@ -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 } diff --git a/runtime/help/defaultkeys.md b/runtime/help/defaultkeys.md index bc7fce50..b724ab56 100644 --- a/runtime/help/defaultkeys.md +++ b/runtime/help/defaultkeys.md @@ -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 |