From 8368af3cc8e5cc3badf9c2688d8d578ed9a8a0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Karl?= <3951388+JoeKar@users.noreply.github.com> Date: Wed, 13 Mar 2024 21:34:52 +0100 Subject: [PATCH] command: Fix set local-only options for the current buffer only (#3042) --- internal/action/command.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/action/command.go b/internal/action/command.go index fb1eadfb..cc20d649 100644 --- a/internal/action/command.go +++ b/internal/action/command.go @@ -532,8 +532,12 @@ func SetGlobalOptionNative(option string, nativeValue interface{}) error { } } - for _, b := range buffer.OpenBuffers { - b.SetOptionNative(option, nativeValue) + if local { + MainTab().CurPane().Buf.SetOptionNative(option, nativeValue) + } else { + for _, b := range buffer.OpenBuffers { + b.SetOptionNative(option, nativeValue) + } } return config.WriteSettings(filepath.Join(config.ConfigDir, "settings.json"))