company-box icon indicating copy to clipboard operation
company-box copied to clipboard

Completion box shrinks when scrolling through completions

Open vn-ki opened this issue 4 years ago • 3 comments

I'm using emacs and when I use arrow keys or any other keys to cycle through the completions, the box containing the completions and documentation shrinks.

Before scrolling: image

After scrolling a few times: image

I tried with no configuration for company box also (the screenshot has configuration) and still the same.

vn-ki avatar Jul 27 '19 17:07 vn-ki

Hi, thanks for creating company-box! Sadly I'm also experiencing this issue. Actually I had 2 problems, one of these is described in this ticket but I was able to resolve it by setting the x-gtk-resize-child-frames to 'hide.

But I still have the shrinking problem when going down to the second page of the completions popup.

First page looks good: image

When the contents are narrow, the popup width shrinks: image

Is there a way to set a fixed width? Probably to the max length of the items?

I'm using Emacs 27 in Fedora 32 with Gnome Desktop, and Wayland, which I guess it is related with this problem.

Thanks!

ig-perez avatar Nov 23 '20 02:11 ig-perez

When the contents are narrow, the popup width shrinks

@ig-perez I might just have the perfect fix for you. Try the variables controlled by company-mode (not company-box):

;; set them to the same number!
  (setq company-tooltip-minimum-width 70)
  (setq company-tooltip-maximum-width 70)

ianyepan avatar May 09 '21 18:05 ianyepan

Thank you @ianpan870102 I just tried that out and worked perfectly!.

ig-perez avatar May 23 '21 16:05 ig-perez