Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

history: update pos after compact

Jeffrey Morgan57a58db1b0cf
diff --git a/readline/history.go b/readline/history.go
index b16f937d8..5a7c34e27 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()
}