File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,12 @@ def handle_value(msg):
229229 eval .update ("success" , msg .get ("value" ))
230230 return True
231231
232+ def set_selection (view , region ):
233+ sel = view .sel ()
234+ sel .clear ()
235+ sel .add (region )
236+ view .show (region , show_surrounds = True , keep_to_left = True , animate = True )
237+
232238def handle_exception (msg ):
233239 if "id" in msg and msg ["id" ] in conn .evals :
234240 eval = conn .evals [msg ["id" ]]
@@ -243,6 +249,7 @@ def handle_exception(msg):
243249 column = get ("column" )
244250 point = eval .view .text_point_utf16 (line - 1 , column - 1 , clamp_column = True )
245251 region = sublime .Region (point , eval .view .line (point ).end ())
252+ set_selection (eval .view , sublime .Region (point , point ))
246253 eval .trace = get ("trace" )
247254 eval .update ("exception" , text , region )
248255 return True
You can’t perform that action at this time.
0 commit comments