From c19dce87e40e04fa5876213a7175788410c0d848 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 17 Jun 2020 10:35:59 -0700 Subject: [PATCH 1/2] Fix typo in defaultkeys (#1730) --- runtime/help/defaultkeys.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 | From 3516c8a9a632d375aefa3f3fe13f59d6b84e42ae Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Wed, 17 Jun 2020 22:43:22 -0400 Subject: [PATCH 2/2] Start replacement search at cursor location Fixes #1731 --- internal/action/command.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }