GNU bug report logs -
#47868
28.0.50; [native-comp] vertico package doesn't work when loading the corresponding eln file
Previous Next
Reported by: Tassilo Horn <tsdh <at> gnu.org>
Date: Sun, 18 Apr 2021 11:35:01 UTC
Severity: normal
Merged with 47922
Found in versions 27.2, 28.0.50
Done: Andrea Corallo <akrl <at> sdf.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 47868 <at> debbugs.gnu.org (full text, mbox):
Andrea Corallo <akrl <at> sdf.org> writes:
Hi Andrea,
> I think it would be very helpful to know which one is the Emacs
> function that once gets called misbehaves.
That's a bit hard to pinpoint. It happens during `completing-read'
where the two vertico functions below are called from a
`post-command-hook' in order to display vertico's two overlays, the
"count overlay" before the minibuffer prompt, and the "candidates
overlay" starting after the input string. Here's a "screenshot" of how
it is supposed to look like, | representing the usual position of point.
[1/3] Find file: input|
input-candidate1
input-candidate2
input-candidate3
And here are the functions:
--8<---------------cut here---------------start------------->8---
(defun vertico--display-candidates (lines)
"Update candidates overlay `vertico--candidates-ov' with LINES."
(move-overlay vertico--candidates-ov (point-max) (point-max))
(overlay-put vertico--candidates-ov 'after-string
(apply #'concat #(" " 0 1 (cursor t)) (and lines "\n") lines))
(let* ((lh (default-line-height))
(resize (default-value 'resize-mini-windows))
(dp (- (max (cdr (window-text-pixel-size))
(* lh (1+ (if resize (length lines) vertico-count))))
(window-pixel-height)))
(dl (ceiling dp lh)))
(when (or (> dl 0) (eq resize t)) (window-resize nil dl))))
(defun vertico--display-count ()
"Update count overlay `vertico--count-ov'."
(when vertico-count-format
(move-overlay vertico--count-ov (point-min) (point-min))
(overlay-put vertico--count-ov 'before-string
(format (car vertico-count-format)
(format (cdr vertico-count-format)
(cond ((>= vertico--index 0) (1+ vertico--index))
((vertico--allow-prompt-selection-p) "*")
(t "!"))
vertico--total)))))
--8<---------------cut here---------------end--------------->8---
> PS one should just load the .elc file to obtain the corresponding .eln
> loaded.
Ah, ok.
Bye,
Tassilo
This bug report was last modified 4 years and 90 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.