From 57a58db1b0cfb253de31724e756f23bde9a61650 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 27 Oct 2023 20:38:03 -0700 Subject: [PATCH] history: update pos after compact --- readline/history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readline/history.go b/readline/history.go index b16f937d..5a7c34e2 100644 --- a/readline/history.go +++ b/readline/history.go @@ -78,8 +78,8 @@ func (h *History) Init() error { func (h *History) Add(l []rune) { h.Buf.Add(l) - h.Pos = h.Size() h.Compact() + h.Pos = h.Size() if h.Autosave { h.Save() }