buffer/settings: Prevent setting of unchanged option

This commit is contained in:
Jöran Karl
2024-07-23 21:06:21 +02:00
parent c741e36d2d
commit 395d848980

View File

@@ -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" {