mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 14:55:38 -04:00
action/command: Prevent setting of unchanged option
This commit is contained in:
parent
521b63a28c
commit
c741e36d2d
@ -7,6 +7,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -531,6 +532,10 @@ func (h *BufPane) NewTabCmd(args []string) {
|
||||
}
|
||||
|
||||
func doSetGlobalOptionNative(option string, nativeValue interface{}) error {
|
||||
if reflect.DeepEqual(config.GlobalSettings[option], nativeValue) {
|
||||
return nil
|
||||
}
|
||||
|
||||
config.GlobalSettings[option] = nativeValue
|
||||
config.ModifiedSettings[option] = true
|
||||
delete(config.VolatileSettings, option)
|
||||
|
Loading…
Reference in New Issue
Block a user