Ejemplo n.º 1
0
 def highlight_entry(window: sublime.Window,
                     locations: List[Tuple[str, str, Tuple[int, int]]],
                     idx: int) -> None:
     fname, file_path_and_row_col, rowcol = locations[idx]
     row, col = rowcol
     window.open_file(file_path_and_row_col,
                      group=window.active_group(),
                      flags=sublime.TRANSIENT | sublime.ENCODED_POSITION
                      | sublime.FORCE_GROUP)
Ejemplo n.º 2
0
def get_active_views(window: sublime.Window,
                     current_buffer_only: bool) -> List[sublime.View]:
    """Returns all currently visible views"""

    if current_buffer_only:
        group_indexes = [window.active_group()]
    else:
        group_indexes = list(range(window.num_groups()))

    return [window.active_view_in_group(idx)
            for idx in group_indexes]  # type: ignore