Skip to content

Commit c741e36

Browse files
committed
action/command: Prevent setting of unchanged option
1 parent 521b63a commit c741e36

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/action/command.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"os"
88
"os/exec"
99
"path/filepath"
10+
"reflect"
1011
"regexp"
1112
"strconv"
1213
"strings"
@@ -531,6 +532,10 @@ func (h *BufPane) NewTabCmd(args []string) {
531532
}
532533

533534
func doSetGlobalOptionNative(option string, nativeValue interface{}) error {
535+
if reflect.DeepEqual(config.GlobalSettings[option], nativeValue) {
536+
return nil
537+
}
538+
534539
config.GlobalSettings[option] = nativeValue
535540
config.ModifiedSettings[option] = true
536541
delete(config.VolatileSettings, option)

0 commit comments

Comments
 (0)