diff --git a/cmd/micro/buffer.go b/cmd/micro/buffer.go index c74ee3b7..fbcb602a 100644 --- a/cmd/micro/buffer.go +++ b/cmd/micro/buffer.go @@ -162,9 +162,9 @@ func (b *Buffer) ReOpen() { } b.ModTime, _ = GetModTime(b.Path) - b.Cursor.Relocate() b.IsModified = false b.Update() + b.Cursor.Relocate() } // Update fetches the string from the rope and updates the `text` and `lines` in the buffer diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 343e9f6e..8d85692c 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -192,6 +192,8 @@ func (v *View) CloseBuffer() { func (v *View) ReOpen() { if v.CanClose("Continue? (yes, no, save) ") { v.Buf.ReOpen() + v.Relocate() + v.matches = Match(v) } }