File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -799,11 +799,12 @@ end
799799
800800
801801function M .run_to_cursor ()
802- if not session then
802+ local lsession = session
803+ if not lsession then
803804 notify (' Cannot use run_to_cursor without active session' , vim .log .levels .INFO )
804805 return
805806 end
806- if not session .stopped_thread_id then
807+ if not lsession .stopped_thread_id then
807808 notify (' run_to_cursor can only be used if stopped at a breakpoint' , vim .log .levels .INFO )
808809 return
809810 end
@@ -840,13 +841,13 @@ function M.run_to_cursor()
840841 lazy .breakpoints .set (opts , buf , line )
841842 end
842843 end
843- session :set_breakpoints (bps_before , nil )
844+ lsession :set_breakpoints (bps_before , nil )
844845 end
845846
846847 M .listeners .before .event_stopped [' dap.run_to_cursor' ] = restore_breakpoints
847848 M .listeners .before .event_terminated [' dap.run_to_cursor' ] = restore_breakpoints
848- session :set_breakpoints (temp_bps , function ()
849- session :_step (' continue' )
849+ lsession :set_breakpoints (temp_bps , function ()
850+ lsession :_step (' continue' )
850851 end )
851852end
852853
You can’t perform that action at this time.
0 commit comments