-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
(fix)Format completions to window-width, not frame-width #2040
Conversation
Format minibuffer completion candidates using window-width instead of frame-width to render as single line even if frame is split
@stuhlmueller see #1578 for some discussion about The TLDR is that |
Ah, thanks! Any reason not to merge the workaround mentioned there? |
Think it slipped me. Modify this PR to the workaround and I'll merge it? |
Done! |
I'm a little late, but this PR messes up Vertico's work, especially because Vertico always Might be worth a try replace - (1- (if (bufferp (current-buffer))
+ (1- (if (minibufferp) My (org-roam-node-display-template (concat "${title:*} " (propertize "${tags:100}" 'face 'org-tag))) You can try variant paste this into + (defun my/org-roam-node-read--to-candidate (node template)
+ "Return a minibuffer completion candidate given NODE.
+ TEMPLATE is the processed template used to format the entry."
+ (let ((candidate-main (org-roam-node--format-entry
+ template
+ node
+ (1- (if (minibufferp)
+ (window-width) (frame-width))))))
+ (cons (propertize candidate-main 'node node) node)))
+
+ (advice-add 'org-roam-node-read--to-candidate :override #'my/org-roam-node-read--to-candidate)) I would like this to be tried by users of different completion engines (Helm, vertico, whatever), because |
Format minibuffer completion candidates using
window-width
instead offrame-width
. This way completions render as a single line even if the frame is split.Before: Empty line between completions
After: No empty line between completions