Removed state arguments from think handlers.

The state can be taken directly from the debugger object
This commit is contained in:
IdanArye 2013-12-27 22:54:11 +02:00
parent 6d5f612bbf
commit a820f6b777
2 changed files with 7 additions and 7 deletions

View File

@ -62,7 +62,7 @@ function! s:f_debugger.handleLine(pipeName,line) dict
endfor
for l:thinkHandler in self.thinkHandlers
call l:thinkHandler.handle(l:readResult,self.state,self)
call l:thinkHandler.handle(l:readResult,self)
endfor
endfunction

View File

@ -52,17 +52,17 @@ function s:standardFunctions.relativeSrcPath(filename) dict
endfunction
let s:standardThinkHandlers={}
function! s:standardThinkHandlers.moveToCurrentLine(readResult,state,debugger) dict
function! s:standardThinkHandlers.moveToCurrentLine(readResult,debugger) dict
if !empty(a:readResult.std.location)
if a:state.std.location!=a:readResult.std.location
if has_key(a:state.std.location,'file')
exe 'sign unplace 1 file='.fnameescape(a:state.std.location.file)
if a:debugger.state.std.location!=a:readResult.std.location
if has_key(a:debugger.state.std.location,'file')
exe 'sign unplace 1 file='.fnameescape(a:debugger.state.std.location.file)
endif
let a:state.std.location=deepcopy(a:readResult.std.location)
let a:debugger.state.std.location=deepcopy(a:readResult.std.location)
if !bufexists(a:readResult.std.location.file)
exe 'new '.(a:readResult.std.location.file)
endif
call vebugger#std#updateMarksForFile(a:state,a:readResult.std.location.file)
call vebugger#std#updateMarksForFile(a:debugger.state,a:readResult.std.location.file)
exe 'sign jump 1 file='.fnameescape(a:readResult.std.location.file)
endif
endif