From f53abcf723e68fb0cf3ce867e27f3fbfef823e67 Mon Sep 17 00:00:00 2001 From: IdanArye Date: Sat, 17 May 2014 19:50:07 +0300 Subject: [PATCH] Added statement execution for rdebug --- autoload/vebugger/rdebug.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/autoload/vebugger/rdebug.vim b/autoload/vebugger/rdebug.vim index 7e43b47..a8e1d2c 100644 --- a/autoload/vebugger/rdebug.vim +++ b/autoload/vebugger/rdebug.vim @@ -15,6 +15,7 @@ function! vebugger#rdebug#start(entryFile,args) call l:debugger.setWriteHandler('std','flow',function('s:writeFlow')) call l:debugger.setWriteHandler('std','breakpoints',function('s:writeBreakpoints')) call l:debugger.setWriteHandler('std','evaluateExpressions',function('s:requestEvaluateExpression')) + call l:debugger.setWriteHandler('std','executeStatements',function('s:executeStatements')) call l:debugger.setWriteHandler('std','removeAfterDisplayed',function('s:removeAfterDisplayed')) call l:debugger.generateWriteActionsFromTemplate() @@ -74,6 +75,15 @@ function! s:requestEvaluateExpression(writeAction,debugger) endfor endfunction +function! s:executeStatements(writeAction,debugger) + for l:evalAction in a:writeAction + if has_key(l:evalAction,'statement') + "rdebug uses Ruby functions for commands + call a:debugger.writeLine(l:evalAction.statement) + endif + endfor +endfunction + function! s:readEvaluatedExpressions(pipeName,line,readResult,debugger) if 'out'==a:pipeName let l:matches=matchlist(a:line,'\v^(\d+)\: (.*) \= (.*)$')