def run(self, edit, item='hunk', which=0, start=None):
        # There is nothing to do here
        if self.view.settings().get('git_diff_clean') is True:
            return

        if item not in ('hunk', 'file'):
            return
        try:
            which = int(which)
        except ValueError:
            if which not in ('first', 'last', 'next', 'prev'):
                return

        if start is not None:
            start = int(start)
        elif self.view.sel():
            start = self.view.sel()[0].begin()
        else:
            start = 0

        file_lookup = self.parse_diff()
        hunk_lookup = self.build_lookup(file_lookup)
        if not hunk_lookup:
            return

        goto = None
        if which == 'first':
            goto, _ = hunk_lookup[0]
        elif which == 'last':
            goto, _ = hunk_lookup[-1]
        elif which == 'next':
            if item == 'hunk':
                next_hunks = [(h, f) for h, f in hunk_lookup if h.begin() > start]
                goto, _ = next_hunks[0] if next_hunks else hunk_lookup[-1]
            else:
                next_files = [(f, h) for f, h in file_lookup if f.begin() > start]
                goto, _ = next_files[0] if next_files else file_lookup[-1]
        elif which == 'prev':
            if item == 'hunk':
                prev_hunks = [(h, f) for h, f in hunk_lookup if h.end() < start]
                goto, _ = prev_hunks[-1] if prev_hunks else hunk_lookup[0]
            else:
                prev_files = [(f, h) for f, h in file_lookup if h[-1].end() < start]
                goto, _ = prev_files[-1] if prev_files else file_lookup[0]
        else:
            if item == 'hunk':
                goto, _ = hunk_lookup[max(0, which)] if len(hunk_lookup) < which else hunk_lookup[-1]
            else:
                goto, _ = file_lookup[max(0, which)] if which < len(file_lookup) else file_lookup[-1]

        if goto:
            self.move_to_point(goto.begin())
dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/diff.py/GitDiffMoveCommand.run/swapped operands of `<`