From d7c1bdd27c77301efb4e0d0fcb47b835c8b19349 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 16 Dec 2021 23:06:03 +0000 Subject: [PATCH] Fix bug in #tmux#isOption() Actually use `a:option` instead of `'set-clipboard'` string when comparing the tmux option value. This hasn't been an issue because the only use of the function happens to be checking the value of `'set-clipboard'`. --- autoload/tmux.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/tmux.vim b/autoload/tmux.vim index 6e78885..1eb5075 100644 --- a/autoload/tmux.vim +++ b/autoload/tmux.vim @@ -16,6 +16,6 @@ function! tmux#isOption(option, value) abort if !tmux#inSession() return 0 endif - let l:set_clipboard = trim(system('tmux show-options -g '.a:option)) - return l:set_clipboard ==# 'set-clipboard '.a:value + let l:option = trim(system('tmux show-options -g '.a:option)) + return l:option ==# a:option.' '.a:value endfunction