Question: how to redraw the posframe after toggling vertico-posframe-truncate-lines
fuyu0425 opened this issue · 0 comments
Hi I have a question:
I want to redraw the vertico-posframe after toggle vertico-posframe-truncate-lines
This is my code.
(defun leo/toggle-vertico-posframe-truncate-lines ()
(interactive)
(setq vertico-posframe-truncate-lines
(not vertico-posframe-truncate-lines))
(vertico-posframe-cleanup))
(define-key vertico-multiform-map (kbd "M-L") #'leo/toggle-vertico-posframe-truncate-lines))
I have also tested (redraw-frame posframe--frame)
but it does not work either.
Use case. test with find-file
with long directory path (longer than vertico-posframe-width
)
posframe without truncate line
(setq vertico-posframe-width 100
vertico-posframe-height 21)
And I want to Hit M-L
to toggle between two.
But when I toggle from with truncate line
to without truncate line
It does not work, only when I move the cursor back a little, the truncate line get back to having an effect.
Initially with truncate-line off => M-L => truncate-line on => M-L => truncate-line off again but I need to move cursor back to have the same effect the the initial one.
Not sure whether I should ask this question in vertico-posframe
or vertico