mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-08 08:50:57 +00:00
Fix issue with simultaneous buffers
This commit is contained in:
parent
a9120ce270
commit
2ef4f83358
1 changed files with 4 additions and 4 deletions
|
|
@ -281,15 +281,15 @@ func NewBuffer(r io.Reader, size int64, path string, startcursor Loc, btype BufT
|
|||
b.LineArray = NewLineArray(uint64(size), FFAuto, reader)
|
||||
}
|
||||
b.EventHandler = NewEventHandler(b.SharedBuffer, b.cursors)
|
||||
|
||||
// The last time this file was modified
|
||||
b.UpdateModTime()
|
||||
}
|
||||
|
||||
if b.Settings["readonly"].(bool) && b.Type == BTDefault {
|
||||
b.Type.Readonly = true
|
||||
}
|
||||
|
||||
// The last time this file was modified
|
||||
b.UpdateModTime()
|
||||
|
||||
switch b.Endings {
|
||||
case FFUnix:
|
||||
b.Settings["fileformat"] = "unix"
|
||||
|
|
@ -319,7 +319,7 @@ func NewBuffer(r io.Reader, size int64, path string, startcursor Loc, btype BufT
|
|||
b.AddCursor(NewCursor(b, b.StartCursor))
|
||||
b.GetActiveCursor().Relocate()
|
||||
|
||||
if !b.Settings["fastdirty"].(bool) {
|
||||
if !b.Settings["fastdirty"].(bool) && !found {
|
||||
if size > LargeFileThreshold {
|
||||
// If the file is larger than LargeFileThreshold fastdirty needs to be on
|
||||
b.Settings["fastdirty"] = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue