'Save the unnamed register.
\'text_to_expect\' is text that we expect
to be contained in the register the next time this method is called -
this could be text from the tabstop that was selected and might have
been overwritten. We will not cache that then.'

def remember_unnamed_register(self, text_to_expect):

    self._unnamed_reg_cached = True
    escaped_text = self._text_to_expect.replace("'", "''")
    res = int(_vim.eval(((('@"    !=    ' + "'") + escaped_text) + "'")))
    if res:
        _vim.command('let    g:_ultisnips_unnamed_reg_cache    =    @"')
    self._text_to_expect = text_to_expect
