Skip to content

Commit 395d848

Browse files
committed
buffer/settings: Prevent setting of unchanged option
1 parent c741e36 commit 395d848

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/buffer/settings.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ package buffer
22

33
import (
44
"crypto/md5"
5+
"reflect"
56

67
"github.com/zyedidia/micro/v2/internal/config"
78
"github.com/zyedidia/micro/v2/internal/screen"
89
)
910

1011
func (b *Buffer) SetOptionNative(option string, nativeValue interface{}) error {
12+
if reflect.DeepEqual(b.Settings[option], nativeValue) {
13+
return nil
14+
}
15+
1116
b.Settings[option] = nativeValue
1217

1318
if option == "fastdirty" {

0 commit comments

Comments
 (0)