File tree Expand file tree Collapse file tree 3 files changed +2
-5
lines changed
Expand file tree Collapse file tree 3 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ b:markdown_extras_links = links.RefreshLinksDict()
1111
1212# Convert links inline links [mylink](blabla) to referenced links [mylink][3 ]
1313command ! - buffer -nargs =0 MDEConvertLinks links.ConvertLinks ()
14+ command ! - buffer -nargs =0 MDEIndices indices.ShowIndices ()
1415
1516# Jump back to the previous file
1617nnoremap <buffer> <backspace> <ScriptCmd> funcs.GoToPrevVisitedBuffer()<cr>
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def IndicesCallback(id: number, idx: number)
1414enddef
1515
1616export def ShowIndices ()
17- if ! empty (' g:markdown_extras_indices' )
17+ if exists ( ' g:markdown_extras_indices ' ) != 0 && ! empty (' g:markdown_extras_indices' )
1818 const popup_width = (&columns * 2 ) / 3
1919 const popup_height = min ([len (g: markdown_extras_indices ), &lines / 2 ])
2020 var opts = {
Original file line number Diff line number Diff line change @@ -26,10 +26,6 @@ if exists('g:markdown_extras_loaded')
2626endif
2727g: markdown_extras_loaded = true
2828
29- if exists (' g:markdown_extras_indices' )
30- command ! - buffer -nargs =0 MDEIndices indices.ShowIndices ()
31- endif
32-
3329augroup MARKDOWN_EXTRAS_VISITED_BUFFER
3430 autocmd !
3531 autocmd BufEnter *.md funcs.AddVisitedBuffer ()
You can’t perform that action at this time.
0 commit comments