Fix bug with on reopen

This commit is contained in:
Zachary Yedidia 2016-05-30 18:22:10 -04:00
parent b312e7c9ad
commit d4caf4510c
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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)
}
}