"\\_<" regex is Emacs-specific and should only be done if
:dynamic-collection is nil.
It is nil for `counsel-git-grep' with repositories < 20000 lines, but
non-nil for larger ones.
Fixes #409
(insert ivy--default)
(when (and (with-ivy-window (derived-mode-p 'prog-mode))
(not (file-exists-p ivy--default))
+ (not (ivy-state-dynamic-collection ivy-last))
(> (point) (minibuffer-prompt-end)))
(undo-boundary)
(insert "\\_>")