commit 946b3feb12d201327d2da576aff71d9a4139392b
parent c5b39a12b4bbdcec4f9f87cf7b592ef3464f97d3
Author: EinfachToll <istjanichtzufassen@googlemail.com>
Date: Thu, 17 May 2018 21:47:50 +0200
Fix one-off error when opening a wiki via the menu
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/vimwiki.vim b/plugin/vimwiki.vim
@@ -339,7 +339,7 @@ function! s:build_menu(topmenu)
let norm_path = fnamemodify(vimwiki#vars#get_wikilocal('path', idx), ':h:t')
let norm_path = escape(norm_path, '\ \.')
execute 'menu '.a:topmenu.'.Open\ index.'.norm_path.
- \ ' :call vimwiki#base#goto_index('.idx.')<CR>'
+ \ ' :call vimwiki#base#goto_index('.(idx+1).')<CR>'
execute 'menu '.a:topmenu.'.Open/Create\ diary\ note.'.norm_path.
\ ' :call vimwiki#diary#make_note('.(idx+1).')<CR>'
endfor