def _set_cursor_location_same_view(source_view, dest_row, dest_col): """ Set `source_view`'s cursor/s to a new location at the same view. """ logger.debug("Navigating to location within the same view.") # Save last cursor location for future use of 'jump_back' command cursor_locations_history = history_list.get_jump_history( source_view.window().id()) cursor_locations_history.push_selection(source_view) # Modify the view's selection (cursors) by clearing and setting new one sel = source_view.sel() sel.clear() zero_based_row, zero_based_col = dest_row - 1, dest_col - 1 point = source_view.text_point(zero_based_row, zero_based_col) sel.add(point) source_view.show(point)
def run(self): get_jump_history(self.window.id()).push_selection(self.window.active_view()) hl = get_jump_history(self.window.id())
def jumplist_update(view): # type: (...) -> None get_jump_history(view.window().id()).push_selection(view)
def jumplist_back(view): return get_jump_history(view.window().id()).jump_back(view)
def run(self): get_jump_history(self.window.id()).push_selection( self.window.active_view()) hl = get_jump_history(self.window.id())
def jumplist_update(view) -> None: get_jump_history(view.window().id()).push_selection(view)