From 899ef40d3c84192e3c6c0b512a40d9e42a8bb3dd Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Wed, 16 Mar 2016 11:05:06 +0900 Subject: [PATCH 1/1] Set emtpy to loclist if :Toc returns no headers --- ftplugin/markdown.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 5db57d8..c2fff46 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -357,11 +357,11 @@ function! s:Toc(...) endif endif endfor + call setloclist(0, l:header_list) if len(l:header_list) == 0 echom "Toc: No headers." return endif - call setloclist(0, l:header_list) if l:window_type ==# 'horizontal' lopen -- 2.39.5