diff --git a/plugin/foreplay.vim b/plugin/foreplay.vim index 307cf93..596cece 100644 --- a/plugin/foreplay.vim +++ b/plugin/foreplay.vim @@ -426,11 +426,16 @@ function! s:filterop(type) abort endfunction function! s:printop(type) abort + let s:todo = s:opfunc(a:type) + call feedkeys("\ForeplayPrintLast") +endfunction + +function! s:print_last() abort try - echo foreplay#eval(s:opfunc(a:type)) + echo foreplay#eval(s:todo) catch /^Clojure:/ - return '' endtry + return '' endfunction function! s:editop(type) abort @@ -563,6 +568,7 @@ function! s:histswap(list) return old endfunction +nnoremap ForeplayPrintLast :exe print_last() nnoremap ForeplayPrint :set opfunc=printopg@ xnoremap ForeplayPrint :call printop(visualmode())