mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-23 01:07:16 +09:00
buffer/settings: Prevent setting of unchanged option
This commit is contained in:
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user