mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
emacs: stop reversing the vertico layout
It works fine most of the time, except when the text is too large and the contents of the minibuffer consist of candidates with long lines. There may be other issues as well, but this is the obvious one that I would encounter frequently while doing 'consult-outline' on, say, my prot-emacs.org file while using any 'fontaine' preset with a default font size greater than 'medium'.
This commit is contained in:
parent
1aa17d616a
commit
233ec940d2
|
|
@ -17773,16 +17773,16 @@ Else do `vertico-exit'."
|
|||
(t
|
||||
(vertico-exit))))
|
||||
|
||||
(cl-defgeneric vertico--display-candidates (lines)
|
||||
"Reverse the default vertico view of LINES."
|
||||
(move-overlay vertico--candidates-ov (point-min) (point-min))
|
||||
;; (setq lines (nreverse lines))
|
||||
(unless (eq vertico-resize t)
|
||||
(setq lines (nconc (make-list (max 0 (- vertico-count (length lines))) "\n") lines)))
|
||||
(let ((string (apply #'concat lines)))
|
||||
(add-face-text-property 0 (length string) 'default 'append string)
|
||||
(overlay-put vertico--candidates-ov 'before-string string)
|
||||
(overlay-put vertico--candidates-ov 'after-string nil)))
|
||||
;; (cl-defgeneric vertico--display-candidates (lines)
|
||||
;; "Reverse the default vertico view of LINES."
|
||||
;; (move-overlay vertico--candidates-ov (point-min) (point-min))
|
||||
;; ;; (setq lines (nreverse lines))
|
||||
;; (unless (eq vertico-resize t)
|
||||
;; (setq lines (nconc (make-list (max 0 (- vertico-count (length lines))) "\n") lines)))
|
||||
;; (let ((string (apply #'concat lines)))
|
||||
;; (add-face-text-property 0 (length string) 'default 'append string)
|
||||
;; (overlay-put vertico--candidates-ov 'before-string string)
|
||||
;; (overlay-put vertico--candidates-ov 'after-string nil)))
|
||||
|
||||
(provide 'prot-vertico)
|
||||
;;; prot-vertico.el ends here
|
||||
|
|
|
|||
|
|
@ -124,16 +124,16 @@ Else do `vertico-exit'."
|
|||
(t
|
||||
(vertico-exit))))
|
||||
|
||||
(cl-defgeneric vertico--display-candidates (lines)
|
||||
"Reverse the default vertico view of LINES."
|
||||
(move-overlay vertico--candidates-ov (point-min) (point-min))
|
||||
;; (setq lines (nreverse lines))
|
||||
(unless (eq vertico-resize t)
|
||||
(setq lines (nconc (make-list (max 0 (- vertico-count (length lines))) "\n") lines)))
|
||||
(let ((string (apply #'concat lines)))
|
||||
(add-face-text-property 0 (length string) 'default 'append string)
|
||||
(overlay-put vertico--candidates-ov 'before-string string)
|
||||
(overlay-put vertico--candidates-ov 'after-string nil)))
|
||||
;; (cl-defgeneric vertico--display-candidates (lines)
|
||||
;; "Reverse the default vertico view of LINES."
|
||||
;; (move-overlay vertico--candidates-ov (point-min) (point-min))
|
||||
;; ;; (setq lines (nreverse lines))
|
||||
;; (unless (eq vertico-resize t)
|
||||
;; (setq lines (nconc (make-list (max 0 (- vertico-count (length lines))) "\n") lines)))
|
||||
;; (let ((string (apply #'concat lines)))
|
||||
;; (add-face-text-property 0 (length string) 'default 'append string)
|
||||
;; (overlay-put vertico--candidates-ov 'before-string string)
|
||||
;; (overlay-put vertico--candidates-ov 'after-string nil)))
|
||||
|
||||
(provide 'prot-vertico)
|
||||
;;; prot-vertico.el ends here
|
||||
|
|
|
|||
Loading…
Reference in a new issue