A noremap runs its keys against codemirror-vim's built-in keymap only, and
the function text objects were mapped after it as user mappings, so
`nnoremap X daf` deleted nothing. af / if are now part of the built-in
keymap through the existing vim-core patch (as <C-g>u is), and are no
longer re-mapped after every mapclear.
An Insert-mode mapping such as `inoremap . .<C-g>u` typed the literal text ".<C-g>u": codemirror-vim has no <C-g>u command and writes unknown <...> keys of a mapping's right-hand side into the document. inoremap only searches the engine's built-in keymap, so the key is added there through a patch to @replit/codemirror-vim-core, bound to an action that isolates the next history event so the text after it starts a new undo group.
Covered by a Vim engine unit test and e2e/vimUndoBreak.spec.ts.
Co-authored-by: angelf015 <[email protected]>