Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to redraw the posframe after toggling vertico-posframe-truncate-lines #33

Open
fuyu0425 opened this issue Jul 19, 2023 · 0 comments

Comments

@fuyu0425
Copy link

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)

Without posframe
圖片

posframe with truncate line
圖片

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.

Like the following GIF.
vertico-posframe

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant