From c741e36d2d32720ba7d9dfb50945aeb52cb9912a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Karl?= <3951388+JoeKar@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:04:21 +0200 Subject: [PATCH] action/command: Prevent setting of unchanged option --- internal/action/command.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/action/command.go b/internal/action/command.go index 8c9230ee..b04892d5 100644 --- a/internal/action/command.go +++ b/internal/action/command.go @@ -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)