fix: Enable use in nested mappings by replacing :redir (#152)

Co-authored-by: Sergey Vlasov <sergey@vlasov.me>
This commit is contained in:
Caleb Maclennan
2023-02-22 11:48:19 +03:00
committed by GitHub
parent 3a4f7a6b99
commit d96c8182d1

View File

@@ -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