Closed conao3 closed 5 years ago
ivy-posframe is an ivy extension, so it should no change ivy's custom variable only if must.
if user want to use different height, maybe write a toggle function is good idea: in this function, set ivy-height.
for example
(defun my-ivy-posframe-toggle ()
(interactive)
(ivy-posframe-enable)
(let ((config '(t . ivy-posframe-display-at-frame-center)))
(if (member config ivy-display-functions-alist)
(progn
(setq ivy-height 10)
(setq ivy-display-functions-alist
(remove config ivy-display-functions-alist))
(message "Ivy-posframe: Demo is disabled."))
(setq ivy-height 20)
(push config ivy-display-functions-alist)
(message "Ivy-posframe: Demo is enabled."))))
That added function was intended that way. I'll use that solution. Thanks!
Hi @tumashu!
I wanted to change the height when
ivy-posframe
is enabled but use default value on normal ivy. We probably want to set more widths than usual whenivy-posframe
is on.I set it this way and expect that the height of
ivy
would change, but in reality only the height ofposframe
would change and there would be more blank areas.In practice, this is the result of two packages fulfilling their respective responsibilities.
ivy
created a candidate forivy-height
, andivy-posframe
displayed the string that ivy passed.This is a policy issue. Do you want to fix this? At first glance, the source looks like it's changing globally, but as I mentioned in the comment, it's actually changing the
let
variables here, so there's no global impact.If you do not change this behavior, it is recommended that we annotate the README.
init.el