Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions autoload/ui.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ let s:outline = []
let s:file = ''
let s:fileLength = 0

function! ui#CloseMarkdownDrawer() abort
execute ':bdelete! ' . bufnr(s:drawerName)
endfunction

function! ui#OpenMarkdownDrawer() abort
let s:file = expand('%:p')
let s:fileLength = line('$')
Expand Down
1 change: 1 addition & 0 deletions ftplugin/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ if !exists('g:markdrawer_to_delete_color')
endif

command! MarkDrawer :call ui#OpenMarkdownDrawer()
command! MarkDrawerClose :call ui#CloseMarkdownClose()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command MarkDrawerClose calls CloseMarkdownClose, but the function in ui.vim is named CloseMarkdownDrawer. For consistency, should this call ui#CloseMarkdownDrawer() instead?

command! MarkDrawerClose :call ui#CloseMarkdownDrawer()

command! -nargs=1 MarkDrawerLevelSet :call ui#MarkDrawerLevelSet(<q-args>)