Fix glitch with undo

This commit is contained in:
Zachary Yedidia
2016-06-07 16:10:39 -04:00
parent f0b6725000
commit 8d184c1870
2 changed files with 3 additions and 3 deletions

View File

@@ -269,7 +269,7 @@ func (b *Buffer) Start() Loc {
// End returns the location of the last character in the buffer
func (b *Buffer) End() Loc {
return Loc{utf8.RuneCount(b.lines[len(b.lines)-1]), b.NumLines - 1}
return Loc{utf8.RuneCount(b.lines[b.NumLines-1]), b.NumLines - 1}
}
// Line returns a single line