From 881a4d6d78a341c85689c188df03393b456f0b30 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Mon, 6 Apr 2026 18:29:23 -0700 Subject: [PATCH] doc: documented trade off regarding last insert tracking --- README.md | 4 ++++ internal/input/handler.go | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e2bb01b..22c2ccf 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,10 @@ I rarely use, and even find a bit un-intuitive. Implementing replace mode in a w actions function the same as insert mode (other than the actual character typing) allows for a much simpler implementation, as well as a more intuitive user experience. +Replace mode implements and replaces (no pun intended) the last inserted keys of insert mode. Due to +the infrequent use of replace mode, and the '.' action for insert mode, this felt like a natural +trade off. + --- ## TODO List diff --git a/internal/input/handler.go b/internal/input/handler.go index 5c574e9..25e0bd3 100644 --- a/internal/input/handler.go +++ b/internal/input/handler.go @@ -583,8 +583,6 @@ func (h *Handler) handleReplaceKey(m action.Model, key string) tea.Cmd { buf.UndoStack.BeginBlock(win.Cursor) } - // TODO: Handle differently - // Record the key for count replay (e.g. 5i...) m.SetInsertKeys(append(m.InsertKeys(), key)) m.SetLastChangeKeys(append(m.LastChangeKeys(), key))