diff --git a/autoload/SpaceVim/plugins/pastebin.vim b/autoload/SpaceVim/plugins/pastebin.vim index cfcfd8ed7..818c5be78 100644 --- a/autoload/SpaceVim/plugins/pastebin.vim +++ b/autoload/SpaceVim/plugins/pastebin.vim @@ -6,6 +6,13 @@ " License: GPLv3 "============================================================================= +if has('nvim-0.9.0') + function! SpaceVim#plugins#pastebin#paste() abort + lua require('spacevim.plugin.pastebin').paste() + endfunction + finish +endif + let s:JOB = SpaceVim#api#import('job') let s:LOGGER =SpaceVim#logger#derive('pastebin') diff --git a/lua/spacevim/plugin/pastebin.lua b/lua/spacevim/plugin/pastebin.lua index 03e06508c..194c174e9 100644 --- a/lua/spacevim/plugin/pastebin.lua +++ b/lua/spacevim/plugin/pastebin.lua @@ -96,6 +96,7 @@ end function M.paste() url = '' local context = get_visual_selection() + log.debug('context is:\n' .. context) if context == '' then log.info('no selection text, skipped.') return