From c126f37f440a0c235a6a18d28c2fa67a351609cb Mon Sep 17 00:00:00 2001 From: Rafael Rojas Date: Sun, 3 Dec 2023 18:30:56 +0100 Subject: [PATCH] Fix (#2) --- autoload/goto_header.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/goto_header.vim b/autoload/goto_header.vim index 220b6db..495075f 100644 --- a/autoload/goto_header.vim +++ b/autoload/goto_header.vim @@ -35,6 +35,7 @@ function! s:CheckConfigVals() let g:goto_header_open_in_new_tab = get(g:, 'goto_header_open_in_new_tab') let g:goto_header_use_shorter_path = get(g:, 'goto_header_use_shorter_path') let g:goto_header_associate_cpp_h = get(g:, 'goto_header_associate_cpp_h') + let g:goto_header_associate_h_cpp = get(g:, 'goto_header_associate_h_cpp') endfunction function! s:OpenFile(fp) @@ -165,7 +166,7 @@ function! goto_header#Switch() \ ".*.cpp$" : (g:goto_header_associate_cpp_h) ? ".h" : ".hpp", \ ".*.hpp$" : ".cpp", \ ".*.c$" : ".h", - \ ".*.h$" : ".c", + \ ".*.h$" : (g:goto_header_associate_h_cpp)? "cpp" : ".c", \} for key in keys(extensions_dict)