I modified the proposed code a little to adapt to the current code and added protection against trying to search in a buffer that is not visiting a file, an prompt to save the buffer if it has been modified.
Plus:
Added a description of the limitations of the dwim commands when using grep.
Add fzf-find-in-buffer originally proposed by LiuYinCarl in https://github.com/bling/fzf.el/issues/94
Plus:
(- v 1)
-->(1- v)