

def run(self, edit, keep_alive_cursor_index=(- 1), keep_alive_cursor_position='b'):
    view = self.view
    current_sels = [s for s in view.sel()]
    trans_sels = view.get_regions('transition_sels')
    trans_sels.extend(current_sels)
    set_transition_sels(view, trans_sels)
    view.erase_regions('mark')
    view.sel().clear()
    try:
        alive_sel = current_sels[keep_alive_cursor_index]
        alive_pos = {
            'a': alive_sel.a,
            'b': alive_sel.b,
            'begin': alive_sel.begin(),
            'end': alive_sel.end(),
        }[keep_alive_cursor_position]
    except Exception:
        alive_sel = current_sels[(- 1)]
        alive_pos = alive_sel.b
    view.sel().add(sublime.Region(alive_pos, alive_pos))

dataset/ETHPy150Open MaokaiLin/PowerCursors/power_cursors.py PowerCursorAddCommand.run/original