From d96c8182d155b0dbb1a9ab4e02675fbe5e69cee2 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 22 Feb 2023 11:48:19 +0300 Subject: [PATCH] fix: Enable use in nested mappings by replacing :redir (#152) Co-authored-by: Sergey Vlasov --- autoload/indent_guides.vim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/autoload/indent_guides.vim b/autoload/indent_guides.vim index 14ff342..e129442 100644 --- a/autoload/indent_guides.vim +++ b/autoload/indent_guides.vim @@ -253,10 +253,7 @@ endfunction " Returns: 'Normal xxx guifg=#323232 guibg=#ffffff' " function! indent_guides#capture_highlight(group_name) abort - redir => l:output - exe 'silent hi ' . a:group_name - redir END - + let l:output = execute('hi ' . a:group_name, 'silent') let l:output = substitute(l:output, '\n', '', '') return l:output endfunction