def _on_highlight(self, data):
        buf_id = data['id']
        user_id = data['user_id']
        username = data.get('username', 'an unknown user')
        ping = G.FOLLOW_MODE or data.get('ping', False)
        previous_highlight = self.user_highlights.get(user_id)
        buf = self.bufs.get(buf_id)
        if not buf:
            return
        view = self.get_view(buf_id)
        if not view:
            if not ping:
                return
            view = self.create_view(buf)
            if not view:
                return
        data['path'] = buf['path']
        self.user_highlights[user_id] = data
        if ping:
            try:
                offset = data['ranges'][0][0]
            except IndexError as e:
                msg.debug('could not get offset from range %s' % e)
            else:
                if data.get('ping'):
                    msg.log('You have been summoned by %s' % (username))
                view.focus()
                view.set_cursor_position(offset)
        if G.SHOW_HIGHLIGHTS:
            if previous_highlight and previous_highlight['id'] == data['id']:
                view.clear_highlight(user_id)
            view.highlight(data['ranges'], user_id)
dataset/ETHPy150Open Floobits/floobits-vim/plugin/floo/vim_handler.py/VimHandler._on_highlight/original