

def get_selected_file_regions(self):
    files = []
    lines = self.get_selected_lines()
    if (not lines):
        return files
    for f in self.get_all_file_regions():
        for l in lines:
            if l.contains(f):
                linestr = self.view.substr(l).strip()
                if (linestr.startswith(STATUS_LABELS['R']) and (' -> ' in linestr)):
                    names = self.view.substr(f)
                    e = names.find(' -> ')
                    s = (e + 4)
                    f1 = sublime.Region(f.begin(), (f.begin() + e))
                    f2 = sublime.Region((f.begin() + s), f.end())
                    files.append((self.section_at_region(f), f1))
                    files.append((self.section_at_region(f), f2))
                else:
                    files.append((self.section_at_region(f), f))
    return files

dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/status.py GitStatusTextCmd.get_selected_file_regions/original