def update(self, vim, dirty, moved):
        mode = vim.mode
        view = vim.view
        tty = vim.tty

        if vim.cmdline:
            view.set_status('actual', vim.cmdline)
        else:
            view.erase_status('actual')

        if tty.row == tty.rows and tty.col > 0:
            char = tty.buf[tty.row - 1][0]
            if ':/' in char:
                if vim.panel:
                    # we already have a panel
                    panel = vim.panel.panel
                    with Edit(panel) as edit:
                        edit.replace(sublime.Region(0, panel.size()), vim.cmdline)
                else:
                    # vim is prompting for input
                    row, col = (tty.row - 1, tty.col - 1)
                    vim.panel = ActualPanel(self)
                    vim.panel.show(char)
                return
        elif vim.panel:
            vim.panel.close()
            vim.panel = None

        if mode in VISUAL_MODES:
            def select():
                v = ActualVim.get(view)
                start = vim.visual
                end = (vim.row, vim.col)
                regions = v.visual(vim.mode, start, end)
                view.sel().clear()
                for r in regions:
                    view.sel().add(sublime.Region(*r))

            Edit.defer(view, select)
            return
        else:
            vim.update_cursor()
dataset/ETHPy150Open lunixbochs/actualvim/actual.py/ActualVim.update/swapped operands of `in`