mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-05 06:30:28 +09:00
Merge branch 'bug-endless-reload-prompt' of https://github.com/jawahars16/micro into jawahars16-bug-endless-reload-prompt
This commit is contained in:
@@ -75,6 +75,10 @@ type SharedBuffer struct {
|
||||
// Type of the buffer (e.g. help, raw, scratch etc..)
|
||||
Type BufType
|
||||
|
||||
// ReloadDisabled allows the user to disable reloads if they
|
||||
// are viewing a file that is constantly changing
|
||||
ReloadDisabled bool
|
||||
|
||||
isModified bool
|
||||
// Whether or not suggestions can be autocompleted must be shared because
|
||||
// it changes based on how the buffer has changed
|
||||
@@ -103,6 +107,11 @@ func (b *SharedBuffer) remove(start, end Loc) []byte {
|
||||
return b.LineArray.remove(start, end)
|
||||
}
|
||||
|
||||
// DisableReload disables future reloads of this sharedbuffer
|
||||
func (b *SharedBuffer) DisableReload() {
|
||||
b.ReloadDisabled = true
|
||||
}
|
||||
|
||||
const (
|
||||
DSUnchanged = 0
|
||||
DSAdded = 1
|
||||
|
||||
Reference in New Issue
Block a user