mirror of
https://github.com/Hopiu/micro.git
synced 2026-05-03 04:14:43 +00:00
buffer/settings: Prevent setting of unchanged option
This commit is contained in:
parent
c741e36d2d
commit
395d848980
1 changed files with 5 additions and 0 deletions
|
|
@ -2,12 +2,17 @@ package buffer
|
|||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"reflect"
|
||||
|
||||
"github.com/zyedidia/micro/v2/internal/config"
|
||||
"github.com/zyedidia/micro/v2/internal/screen"
|
||||
)
|
||||
|
||||
func (b *Buffer) SetOptionNative(option string, nativeValue interface{}) error {
|
||||
if reflect.DeepEqual(b.Settings[option], nativeValue) {
|
||||
return nil
|
||||
}
|
||||
|
||||
b.Settings[option] = nativeValue
|
||||
|
||||
if option == "fastdirty" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue