Skip to content
This repository was archived by the owner on Aug 28, 2020. It is now read-only.

Commit b94b652

Browse files
committed
move to line in file separately from opening a document
1 parent 9b79dba commit b94b652

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

pugdebug/pugdebug.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,16 @@ def focus_current_line(self):
332332
document_widget = self.document_viewer.get_current_document()
333333
document_widget.move_to_line(current_line)
334334

335+
def jump_to_line_in_file(self, file, line):
336+
"""Handle when an item in the stack trace viewer is double clicked.
337+
338+
Show the document, and scroll to the given line.
339+
"""
340+
self.open_document(file)
341+
342+
document_widget = self.document_viewer.get_current_document()
343+
document_widget.move_to_line(line)
344+
335345
def handle_settings_changed(self, changed_settings):
336346
"""Handle when settings have changed.
337347
@@ -707,13 +717,6 @@ def handle_expression_added_or_changed(self, index, expression):
707717
if self.debugger.is_connected():
708718
self.debugger.evaluate_expression(index, expression)
709719

710-
def jump_to_line_in_file(self, file, line):
711-
"""Handle when an item in the stack trace viewer is double clicked.
712-
713-
Show the document, and scroll to the given line.
714-
"""
715-
self.open_document(file, True, line)
716-
717720
def handle_error(self, error):
718721
em = QErrorMessage(self.main_window)
719722
em.showMessage(error)

0 commit comments

Comments
 (0)