Closed dunkarooftop closed 5 years ago
What about set ivy-posframe-width and ivy-posframe-height both?
I tried this in scratch buffer which has no effect. The value do get updated but ivy-posframe-get-size
won't use it.
(setq ivy-posframe-width 110
ivy-posframe-height 30)
Currently my workaround is add this to my config.
(setq ivy-posframe-size-function
(defun ivy-posframe-get-size+ ()
(if (eq this-command
'counsel-bookmark)
(list
:height ivy-posframe-height
:width 70)
(list
:height ivy-posframe-height
:width 110))))
It kinda work but not perfect (The posframe is smaller but not to the size being set) (inspired by the reddit post which talked about the frame size issue) I also try remove my config about the width and hardcode in ivy-posframe.el and recompile it. I does not have effect either. Super strange. Here is a image to show
After poking around I found tweak the size of :min-width from 0.62 to 0.3 fix the problem. (I have a 30 inch wide monitor) The min-width number was larger then my setting which is not being used.
(defun ivy-posframe-get-size ()
"The default functon used by `ivy-posframe-size-function'."
(list
:height ivy-posframe-height
:width ivy-posframe-width
:min-height (or ivy-posframe-min-height (+ ivy-height 1))
:min-width (or ivy-posframe-min-width (round (* (frame-width) 0.62)))))
Updated the package few days ago and start to see
ivy-posframe-width
has no effect.My config will be at the end of the post. I tried to run
(setq ivy-posframe-width NUMBER)
and inspected with C-h C-v see the value get updated butivy-posframe
still show with default value size.Tested on both Emacs 26.3 and 27
Thank you :)