def _update(self, v, dirty, moved):
        data = v.dump()
        self.status, self.cmdline = [
            s.strip() for s in data.rsplit('\n')[-3:-1]
        ]
        try:
            if self.status.count('+') >= 2:
                pos, rest = self.status.split(',', 1)
                row, col = pos.split('+', 1)
                self.row, self.col = int(row), int(col)

                self.mode, vs, rest = rest.split(',', 2)

                a, b = vs.split('+', 1)
                self.modified = (rest == '+')
                self.visual = (int(a), int(b))
            # print(self.status)
        except __HOLE__:
            pass

        if self.monitor:
            with Edit(self.monitor) as edit:
                if dirty:
                    edit.erase(sublime.Region(0, self.monitor.size()))
                    edit.insert(0, data)
                    edit.reselect(
                        lambda view: view.text_point(v.row - 1, v.col - 1))

                def update_cursor(view, edit):
                    row, col = (self.row - 1, self.col + 1)
                    # see if it's prompting for input
                    if v.row == self.rows and v.col > 0:
                        char = v.buf[v.row - 1][0]
                        if char in ':/':
                            row, col = (v.row - 1, v.col - 1)
                    pos = view.text_point(row, col)
                    sel = sublime.Region(pos, pos)
                    view.add_regions(
                        'cursor', [sel], 'comment',
                        '', sublime.DRAW_EMPTY,
                    )
                if moved:
                    edit.callback(update_cursor)

        if self.update_callback:
            self.update_callback(self, dirty, moved)
dataset/ETHPy150Open lunixbochs/actualvim/vim.py/Vim._update