Fix undo autocomplete

This commit is contained in:
Zachary Yedidia
2020-08-16 01:03:41 -04:00
parent 724cedd37b
commit 98b3ed0eec
4 changed files with 17 additions and 2 deletions

View File

@@ -48,6 +48,11 @@ func (l Loc) LessEqual(b Loc) bool {
return l == b
}
// Equal returns true if two locs are equal
func (l Loc) Equal(b Loc) bool {
return l.Y == b.Y && l.X == b.X
}
// The following functions require a buffer to know where newlines are
// Diff returns the distance between two locations