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