Move backup & save related stuff from Buffer to SharedBuffer

Various methods of Buffer should be rather methods of SharedBuffer. This
commit doesn't move all of them to SharedBuffer yet, only those that
need to be moved to SharedBuffer in order to be able to request creating
or removing backups in other SharedBuffer methods.
This commit is contained in:
Dmytro Maluka
2025-07-27 02:41:25 +02:00
parent f938f62e31
commit e84d44d451
3 changed files with 16 additions and 15 deletions

View File

@@ -123,6 +123,8 @@ type SharedBuffer struct {
// Hash of the original buffer -- empty if fastdirty is on
origHash [md5.Size]byte
fini int32
}
func (b *SharedBuffer) insert(pos Loc, value []byte) {
@@ -223,7 +225,6 @@ type Buffer struct {
*EventHandler
*SharedBuffer
fini int32
cursors []*Cursor
curCursor int
StartCursor Loc