With this binding in config.fish:
function fish_user_key_bindings
bind \cr 'fg >/dev/null ^/dev/null'
end
Do the following commands in a new shell:
$ vim
# <press Ctrl+Z inside vim to send to background>
# <press Ctrl+r, vim (correctly) restored>
# <press Ctrl+Z again>
# <press Ctrl+r, ^R is printed to terminal, vim is not restored>
In particular, no key bindings work at this point until enter or ^J is pressed.