Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive scroll bar #44

Open
ar1a opened this issue Jul 5, 2018 · 23 comments
Open

Massive scroll bar #44

ar1a opened this issue Jul 5, 2018 · 23 comments

Comments

@ar1a
Copy link

ar1a commented Jul 5, 2018

Picture

Not sure how to reproduce though

@ar1a
Copy link
Author

ar1a commented Jul 6, 2018

Another image from someone else

@AloisJanicek
Copy link

I have exactly same problem. I was unable to reproduce it in more vanilla emacs config, but changing this line

'((side . right) (window-width . 2)))))

to this

          '((side . right) (window-width . 0.1)))))

sets width of scrollbar reliably to 32 pixels.
I can live with that.

jsmestad added a commit to jsmestad/company-box that referenced this issue Sep 19, 2018
@smallzhan
Copy link

same issue here, @AloisJanicek changing "side window-width" to 0.1 doesn't help, but it seems harder to reproduce with 0.1 width. Now I totally remove the scrollbar...

@forrestchang
Copy link

forrestchang commented May 16, 2019

same issue here, @AloisJanicek changing "side window-width" to 0.1 doesn't help, but it seems harder to reproduce with 0.1 width. Now I totally remove the scrollbar...

How do you fully disable the scrollbar? Can you show the hack code? @smallzhan

@smallzhan
Copy link

@forrestchang please refer to the gist here https://gist.github.com/smallzhan/4f8a558790133d269d5658ea85d50bf1

detailed modification:
in line 535, set the scrollbar width to 0 in fuction "company-box--update-width", then delete all the lines of calling to the function "company-box--update-scrollbar"

@Majenful
Copy link

Majenful commented May 28, 2019

I still have the scrollbar whereas I copied @smallzhan's gist
company-box

I use doom and I replaced company-box.el in ~/.emacs.d/.local/packages/elpa/company-box-xxxxx/

My info:

  • OS: darwin (x86_64-apple-darwin18.2.0)
  • Emacs: 26.2 (Apr 29, 2019)
  • Doom: 2.0.9 (HEAD -> develop, _upgrade/develop febeed25 2019-05-22 17:11:24 -0400)
  • Graphic display: t (daemon: nil)
  • System features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2
  • Details:
    env bootstrapper: nil
    elc count: 171
    uname -a:  Darwin 18.2.0 Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64 x86_64

@glepnir
Copy link

glepnir commented Aug 29, 2019

@Majenful you should remove the company-box.elc then use the gist code .i tried it ,it will remove the scrollbar.
image

@stardiviner
Copy link
Contributor

I'm still got this issue. Seem no update on company-box anymore. Is there anyone want to maintain a fork?

hlissner added a commit to doomemacs/doomemacs that referenced this issue Jan 13, 2020
Since the problem persists despite the earlier window-width fix.

Fixes sebastiencs/company-box#44
GTrunSec pushed a commit to GTrunSec/doom-emacs that referenced this issue Jan 14, 2020
Since the problem persists despite the earlier window-width fix.

Fixes sebastiencs/company-box#44
@geza-herman
Copy link

For me, setting window-resize-pixelwise to nil (that's the default value) fixed the issue.

@sebastiencs
Copy link
Owner

I think ce8f569 might fix the issue. If anyone can test

@sebastiencs
Copy link
Owner

7c05cfd might fix that issue too

@graphcareful
Copy link

I can confirm that the fix doesn't work for me. I also tried disabling golden-ratio-mode and when opening a company-box buffer I still see the issue.

@sebastiencs
Copy link
Owner

@graphcareful Can you please share some information about your configuration.
Which OS are you using, window manager ?
How did you configure company-box ? Is your .emacs.d public by any chance ?

@graphcareful
Copy link

Hi , I am using spacemacs, on Fedora 32, default window manager gnome3. I am configuring company-box like this:
(auto-completion :variables auto-completion-use-company-box t)

I am not sure how company-* and autocomplete-* are supposed to work together. At first I suspected maybe two packages had conflicting configurations, but then I came here and noticed others having the same exact problem. I will try to replicate with a base spacemacs configuration.

@sebastiencs
Copy link
Owner

@graphcareful I just installed spacemacs to test, the only modification I made is:

.spacemacs | 3 ++-
modified   .spacemacs
@@ -37,6 +37,7 @@ values."
      ;; <M-m f e R> (Emacs style) to install them.
      ;; ----------------------------------------------------------------
      helm
+     (auto-completion :variables auto-completion-use-company-box t)
      ;; auto-completion
      ;; better-defaults
      emacs-lisp
@@ -54,7 +55,7 @@ values."
    ;; wrapped in a layer. If you need some configuration for these
    ;; packages, then consider creating a layer. You can also put the
    ;; configuration in `dotspacemacs/user-config'.
-   dotspacemacs-additional-packages '()
+   dotspacemacs-additional-packages '(company-box)
    ;; A list of packages that cannot be updated.
    dotspacemacs-frozen-packages '()
    ;; A list of packages that will not be installed and loaded.

I then ran [M-x] company-box, and the scrollbar is correct:

image

So there is a package or customization that cause this issue.
If you could try to disable some package/customization made to find the culprit, that would be great

@sebastiencs
Copy link
Owner

@graphcareful Can you please set company-box-debug-scrollbar to t, use company-box and post the logs in the *messages* buffer

(setq company-box-debug-scrollbar t)

@graphcareful
Copy link

You beat me to it :) was about to do the same thing. Yes, i'll try to find the offending package and paste the logs when I find.

@graphcareful
Copy link

graphcareful commented Sep 16, 2020

So I tried to emulate your exact settings and I am still seeing the issue.

Screenshot from 2020-09-16 18-28-05

try scrolling down with page down when there are many items to replicate.

Here are some of the logs you requested. They appeared when I am seeing the issue:

`[SCROLL] SELECTION=0 BUFFER= company-box-27263302-scrollbar H-FRAME=170 N-ELEMENTS=333 PERCENT=0.0 PERCENT-DISPLAY=0.03003003003003003 SCROLLBAR-PIXEL=5.105105105105105 HEIGHT=SCROLLBAR=0.3003003003003003 BLANK-PIXELS=0.0 HEIGHT-BLANK=0.0 FRAME-CHAR-HEIGHT=17 FRAME-CHAR-HEIGHT-NO-FRAME=17 FRAME=#<frame 0x69de800> MUL=5661 [2 times]
[CHANGES] CURRENT-BUFFER= company-box-27263302-scrollbar MIN-WIDTH=2 SAFE-MIN-WIDTH=2 MIN-SIZE=2 MIN-SIZE-IGNORE=2
[CHANGES] MIN CURRENT-SIZE=2 WIN-MIN-SIZE=2 WIN-PARAMS=((quit-restore window window #<window 12 on company-box-27263302> company-box-27263302-scrollbar) (window-slot . 0) (window-side . right)) FRAME-PARAMS=((parent-id . 27263302) (explicit-name . t) (display . :0) (icon-name) (outer-window-id . 27264557) (window-id . 27264561) (top . 527) (left . 8) (buried-buffer-list) (buffer-list .spacemacs) (unsplittable) (modeline . t) (width . 38) (user-size . t) (user-position . t) (name . ) (desktop-dont-save . t) (cursor-color . SkyBlue2) (background-mode . dark) (display-type . color) (default-minibuffer-frame . #<frame emacs@x1c-laptop 0x27a0f60>) (drag-internal-border . t) (no-other-frame . t) (mouse-wheel-frame) (z-group) (skip-taskbar) (visibility . t) (fullscreen) (no-accept-focus . t) (no-focus-on-map . t) (alpha) (scroll-bar-height . 16) (scroll-bar-width . 16) (cursor-type) (auto-lower) (auto-raise) (icon-type . t) (inhibit-double-buffering) (tool-bar-position . top) (wait-for-wm . t) (title) (buffer-predicate . spacemacs/useful-buffer-p) (tool-bar-lines . 0) (height . 10) (tab-bar-lines . 0) (menu-bar-lines . 0) (min-height . 0) (min-width . 0) (scroll-bar-background) (scroll-bar-foreground) (no-special-glyphs . t) (right-fringe . 0) (left-fringe . 0) (line-spacing . 0) (screen-gamma) (border-color . black) (mouse-color . black) (background-color . #34323e) (foreground-color . #b2b2b2) (horizontal-scroll-bars) (vertical-scroll-bars) (bottom-divider-width . 0) (right-divider-width . 0) (internal-border-width . 1) (border-width . 0) (font . -ADBO-Source Code Pro-normal-normal-normal--13----m-0-iso10646-1) (font-parameter . -ADBO-Source Code Pro-normal-normal-normal--13----m-0-iso10646-1) (font-backend ftcrhb x) (override-redirect) (undecorated . t) (parent-frame . #<frame emacs@x1c-laptop 0x27a0f60>) (minibuffer . #<window 4 on Minibuf-0>)) HOOKS=(evil--jumps-window-configuration-hook t company-box--scrollbar-prevent-changes)
[SCROLL] SELECTION=0 BUFFER= company-box-27263302-scrollbar H-FRAME=170 N-ELEMENTS=333 PERCENT=0.0 PERCENT-DISPLAY=0.03003003003003003 SCROLLBAR-PIXEL=5.105105105105105 HEIGHT=SCROLLBAR=0.3003003003003003 BLANK-PIXELS=0.0 HEIGHT-BLANK=0.0 FRAME-CHAR-HEIGHT=17 FRAME-CHAR-HEIGHT-NO-FRAME=17 FRAME=#<frame 0x69de800> MUL=5661

[SCROLL] SELECTION=10 BUFFER= company-box-27263302-scrollbar H-FRAME=170 N-ELEMENTS=333 PERCENT=0.030120481927710843 PERCENT-DISPLAY=0.03003003003003003 SCROLLBAR-PIXEL=5.105105105105105 HEIGHT=SCROLLBAR=0.3003003003003003 BLANK-PIXELS=4.96671370165346 HEIGHT-BLANK=0.2921596295090271 FRAME-CHAR-HEIGHT=17 FRAME-CHAR-HEIGHT-NO-FRAME=17 FRAME=#<frame 0x69de800> MUL=5661
[SCROLL] SELECTION=20 BUFFER= company-box-27263302-scrollbar H-FRAME=170 N-ELEMENTS=333 PERCENT=0.060240963855421686 PERCENT-DISPLAY=0.03003003003003003 SCROLLBAR-PIXEL=5.105105105105105 HEIGHT=SCROLLBAR=0.3003003003003003 BLANK-PIXELS=9.93342740330692 HEIGHT-BLANK=0.5843192590180541 FRAME-CHAR-HEIGHT=17 FRAME-CHAR-HEIGHT-NO-FRAME=17 FRAME=#<frame 0x69de800> MUL=5661
[CHANGES] CURRENT-BUFFER= company-box-27263302-scrollbar MIN-WIDTH=2 SAFE-MIN-WIDTH=2 MIN-SIZE=2 MIN-SIZE-IGNORE=2
[CHANGES] MIN CURRENT-SIZE=3 WIN-MIN-SIZE=2 WIN-PARAMS=((quit-restore window window #<window 12 on company-box-27263302> company-box-27263302-scrollbar) (window-slot . 0) (window-side . right)) FRAME-PARAMS=((parent-id . 27263302) (explicit-name . t) (display . :0) (icon-name) (outer-window-id . 27264557) (window-id . 27264561) (top . 527) (left . 8) (buried-buffer-list) (buffer-list .spacemacs) (unsplittable) (modeline . t) (width . 55) (user-size . t) (user-position . t) (name . ) (desktop-dont-save . t) (cursor-color . SkyBlue2) (background-mode . dark) (display-type . color) (default-minibuffer-frame . #<frame emacs@x1c-laptop 0x27a0f60>) (drag-internal-border . t) (no-other-frame . t) (mouse-wheel-frame) (z-group) (skip-taskbar) (visibility . t) (fullscreen) (no-accept-focus . t) (no-focus-on-map . t) (alpha) (scroll-bar-height . 16) (scroll-bar-width . 16) (cursor-type) (auto-lower) (auto-raise) (icon-type . t) (inhibit-double-buffering) (tool-bar-position . top) (wait-for-wm . t) (title) (buffer-predicate . spacemacs/useful-buffer-p) (tool-bar-lines . 0) (height . 10) (tab-bar-lines . 0) (menu-bar-lines . 0) (min-height . 0) (min-width . 0) (scroll-bar-background) (scroll-bar-foreground) (no-special-glyphs . t) (right-fringe . 0) (left-fringe . 0) (line-spacing . 0) (screen-gamma) (border-color . black) (mouse-color . black) (background-color . #34323e) (foreground-color . #b2b2b2) (horizontal-scroll-bars) (vertical-scroll-bars) (bottom-divider-width . 0) (right-divider-width . 0) (internal-border-width . 1) (border-width . 0) (font . -ADBO-Source Code Pro-normal-normal-normal--13----m-0-iso10646-1) (font-parameter . -ADBO-Source Code Pro-normal-normal-normal--13----m-0-iso10646-1) (font-backend ftcrhb x) (override-redirect) (undecorated . t) (parent-frame . #<frame emacs@x1c-laptop 0x27a0f60>) (minibuffer . #<window 4 on Minibuf-0>)) HOOKS=(evil--jumps-window-configuration-hook t company-box--scrollbar-prevent-changes)
[2 times]
[SCROLL] SELECTION=30 BUFFER= company-box-27263302-scrollbar H-FRAME=170 N-ELEMENTS=333 PERCENT=0.09036144578313253 PERCENT-DISPLAY=0.03003003003003003 SCROLLBAR-PIXEL=5.105105105105105 HEIGHT=SCROLLBAR=0.3003003003003003 BLANK-PIXELS=14.900141104960381 HEIGHT-BLANK=0.8764788885270812 FRAME-CHAR-HEIGHT=17 FRAME-CHAR-HEIGHT-NO-FRAME=17 FRAME=#<frame 0x69de800> MUL=5661
[CHANGES] CURRENT-BUFFER= company-box-27263302-scrollbar MIN-WIDTH=2 SAFE-MIN-WIDTH=2 MIN-SIZE=2 MIN-SIZE-IGNORE=2
[CHANGES] MIN CURRENT-SIZE=2 WIN-MIN-SIZE=2 WIN-PARAMS=((quit-restore window window #<window 12 on company-box-27263302> company-box-27263302-scrollbar) (window-slot . 0) (window-side . right)) FRAME-PARAMS=((parent-id . 27263302) (explicit-name . t) (display . :0) (icon-name) (outer-window-id . 27264557) (window-id . 27264561) (top . 527) (left . 8) (buried-buffer-list) (buffer-list .spacemacs) (unsplittable) (modeline . t) (width . 50) (user-size . t) (user-position . t) (name . ) (desktop-dont-save . t) (cursor-color . SkyBlue2) (background-mode . dark) (display-type . color) (default-minibuffer-frame . #<frame emacs@x1c-laptop 0x27a0f60>) (drag-internal-border . t) (no-other-frame . t) (mouse-wheel-frame) (z-group) (skip-taskbar) (visibility . t) (fullscreen) (no-accept-focus . t) (no-focus-on-map . t) (alpha) (scroll-bar-height . 16) (scroll-bar-width . 16) (cursor-type) (auto-lower) (auto-raise) (icon-type . t) (inhibit-double-buffering) (tool-bar-position . top) (wait-for-wm . t) (title) (buffer-predicate . spacemacs/useful-buffer-p) (tool-bar-lines . 0) (height . 10) (tab-bar-lines . 0) (menu-bar-lines . 0) (min-height . 0) (min-width . 0) (scroll-bar-background) (scroll-bar-foreground) (no-special-glyphs . t) (right-fringe . 0) (left-fringe . 0) (line-spacing . 0) (screen-gamma) (border-color . black) (mouse-color . black) (background-color . #34323e) (foreground-color . #b2b2b2) (horizontal-scroll-bars) (vertical-scroll-bars) (bottom-divider-width . 0) (right-divider-width . 0) (internal-border-width . 1) (border-width . 0) (font . -ADBO-Source Code Pro-normal-normal-normal--13----m-0-iso10646-1) (font-parameter . -ADBO-Source Code Pro-normal-normal-normal--13----m-0-iso10646-1) (font-backend ftcrhb x) (override-redirect) (undecorated . t) (parent-frame . #<frame emacs@x1c-laptop 0x27a0f60>) (minibuffer . #<window 4 on Minibuf-0>)) HOOKS=(evil--jumps-window-configuration-hook t company-box--scrollbar-prevent-changes)`

@sebastiencs
Copy link
Owner

sebastiencs commented Sep 17, 2020

@graphcareful Thanks !

Your issue seems different than the others

  • Does the scrollbar always have a wrong size ? If not, did you notice when it happens (after the frame is resized, when you make the scrollbar moving, ...)
  • When it has a wrong size, does it always have the same wrong size ? (width)
  • I see that the documentation frame is on top of the frame with candidates, is that always the case ?
  • Since the doc frame hides part of the other frame, I can't see the width of the scrollbar (the purple horizontal bar), does it go until the very end of the frame ? Could you post another screenshot with the scrollbar fully visible. A video/gif would be great
  • How did you install emacs ? With dnf or you compiled it. If compiled, what branch and commit are you on, and which flags did you use

The logs you shared seem correct so we probably need to dig a bit more

@graphcareful
Copy link

graphcareful commented Sep 18, 2020

In this stripped down config that only has autocomplete-mode and company-box installed...

  • The scrollbar size changes as I scroll down. Initially it always starts with the correct size. Eventually as I scroll down it becomes wider and changes, sometimes disappearing then reappearing with a different size, sometimes it just changes from wide to even wider, then back again.
  • Nope it changes like I described above
  • The doc frame seems to be always at the same y position however sometimes it appears further off to the right leaving a space between the end of the frame and the beginning of the docframe
  • Ok!
  • I compile emacs from scratch using the feature/nativecomp branch, I am currently on or near the tip of the master branch. I have a crude script that does it for me here: https://github.com/graphcareful/reimage/blob/master/scripts/install_emacs.bash#L72

Screencast from 09-18-2020 06_09_41 PM2

sebastiencs added a commit that referenced this issue Sep 20, 2020
@sebastiencs
Copy link
Owner

sebastiencs commented Sep 20, 2020

@graphcareful Thank you for the detailed answer.

It looks like to be an emacs bugs, or an issue with your window manager and/or compositor:
The frame is always keeping the same width, it should change.
The frame for the documentation has a position which depends on the candidates frame width.
The doc position is correct, so internally emacs has the correct width, but it doesn't update the display for the candidates frame.

Can you try to set company-box-debug-scrollbar to t with 97475e4
The logs will confirm if it's an emacs bug.

2c35a72 might fix your issue, but I don't put much hope on it.

I tried the branch feature/nativecomp but I failed to used it with spacemacs, getting lots of errors like syl20bnr/spacemacs#13957
Could you try on the master branch, without --with-nativecomp ?

@graphcareful
Copy link

@sebastiencs ok i'll try without nativecomp as well

@akermu
Copy link

akermu commented Nov 16, 2020

For me it's the same issue as described here tumashu/company-posframe#2. Setting x-gtk-resize-child-frames to 'hide or 'resize-mode fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests