tumashu / vertico-posframe

GNU General Public License v3.0
106 stars 16 forks source link

Long paths #37

Open goldfita opened 9 months ago

goldfita commented 9 months ago

When the path length exceeds the posframe length, the files get cut off.

posframe_cursor_end_path

I'm unable to use the left/right arrow keys, but I can backup with M-b. Then it looks like this.

posframe_cursor_in_path

Also, I noticed a couple other quirks. When the path is too long, the posframe width changes. Also, when you shrink the emacs frame, hit tab, then maximize, the posframe gets moved. You can hit tab again to recenter.

posframe_not_centered

cxa commented 5 months ago

You can use my workaround:

(advice-add 'vertico-posframe--show
            :before
            (defun vertico-posframe--show/before (&rest _args)
              ;; https://github.com/minad/vertico/blob/0f12d85a5a38353471d7657572e69f00fa1b9639/vertico.el#L611
              (setq vertico-posframe-truncate-lines
                    (< (point) (* 0.8 (window-width (active-minibuffer-window)))))))