karthink / consult-dir

Insert paths into the minibuffer prompt in Emacs
GNU General Public License v3.0
160 stars 9 forks source link

Vertico minibuffer is unresponsive after inserting a long line #23

Open ceed0 opened 1 year ago

ceed0 commented 1 year ago

If I run consult-dir from find-file and a selected path is too long, vertico's input is truncated and doesn't work properly until I press TAB.

It could be fixed with consult--completion-refresh-hook like that:

        (when new-dir
          (if consult-dir-shadow-filenames
              (insert "/" new-full-name)
            (delete-minibuffer-contents)
            (insert new-full-name))
          (run-hooks 'consult--completion-refresh-hook)))

But I'm not sure if it's a vertico bug or works as intended, through, because plain minibuffer works without the fix.

karthink commented 1 year ago

Thanks for the heads-up. I'm not able to reproduce this, how long a path do you need to trigger this behavior?

ceed0 commented 1 year ago

Long enough to trigger truncation, I guess. Here how it looks image And here with the fix image

ceed0 commented 1 year ago

And the title is misleading, my bad, I thought it was unresponsive, because vertico ignored old input at the start of the line. So really there only two things that are wrong - line truncation and cursor position.