More actions

This commit is contained in:
Zachary Yedidia
2018-08-28 23:30:39 -04:00
parent 7d87e6db99
commit 31fb3f2df2
6 changed files with 103 additions and 6 deletions

View File

@@ -320,6 +320,20 @@ func calcHash(b *Buffer, out *[md5.Size]byte) {
h.Sum((*out)[:0])
}
func (b *Buffer) insert(pos Loc, value []byte) {
b.isModified = true
b.LineArray.insert(pos, value)
}
func (b *Buffer) remove(start, end Loc) []byte {
b.isModified = true
sub := b.LineArray.remove(start, end)
return sub
}
func (b *Buffer) deleteToEnd(start Loc) {
b.isModified = true
b.LineArray.deleteToEnd(start)
}
// UpdateRules updates the syntax rules and filetype for this buffer
// This is called when the colorscheme changes
func (b *Buffer) UpdateRules() {