def _get_selected_lines(self):
        """Get a list of numbers lines intersecting current selection.

        :return: List of "numbered lines": (index, line) tuples,
                 where ``index`` is 1-based index and ``line`` is a Region
        """
        numbered_lines = []

        line_indices = set()  # to remove lines duplicated across regions
        for region in self.view.sel():
            lines = self.view.lines(region)
            for line in lines:
                index, _ = self.view.rowcol(line.begin())
                if index not in line_indices:
                    line_indices.add(index)
                    numbered_lines.append((index + 1, line))

        # TODO: remove empty or whitespace-only lines
        # at the beginning and end of selection
        return numbered_lines
dataset/ETHPy150Open Xion/SublimeScold/plugin.py/Scold._get_selected_lines/original