Skip to content

Commit

Permalink
history: update pos after compact
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorganca committed Oct 28, 2023
1 parent 2d75a45 commit 57a58db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readline/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 57a58db

Please sign in to comment.