From 8d569823e4c20bdfffc6ce1b94a9d6930c9835a4 Mon Sep 17 00:00:00 2001 From: Alex Constantino Date: Wed, 24 Apr 2024 11:28:31 +0000 Subject: [PATCH] fix failure when g:vim_markdown_toc_location is not defined --- ftplugin/markdown.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index b2a56a5d..39a895b5 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -392,7 +392,7 @@ function! s:Toc(...) if l:window_type ==# 'horizontal' lopen elseif l:window_type ==# 'vertical' - if g:vim_markdown_toc_location ==# 'right' + if exists('g:vim_markdown_toc_location') && g:vim_markdown_toc_location ==# 'right' vertical botright lopen else vertical topleft lopen