Skip to content

Commit

Permalink
Add more logs for scrollbar issue #44
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiencs committed Sep 20, 2020
1 parent 2c35a72 commit 97475e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions company-box.el
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ Examples:
(no-special-glyphs . t))
"Frame parameters used to create the frame.")

(defvar company-box-debug-scrollbar nil)

(defvar-local company-box--ov nil)
(defvar-local company-box--ov-common nil)
(defvar-local company-box--max 0)
Expand Down Expand Up @@ -838,6 +840,8 @@ It doesn't nothing if a font icon is used."
(frame-width (frame-pixel-width (frame-parent)))
(new-x (and (> (+ width company-box--x) frame-width)
(max 0 (- frame-width width char-width)))))
(when company-box-debug-scrollbar
(message "[RESIZE] NEW-WIDTH=%s OLD=%s" (/ width char-width) (frame-parameter frame 'width)))
(or (and value-only (cons new-x width))
(and (> diff 2)
(modify-frame-parameters
Expand All @@ -854,8 +858,6 @@ It doesn't nothing if a font icon is used."
(* company-candidates-length
(frame-char-height frame)))))

(defvar company-box-debug-scrollbar nil)

(defun company-box--scrollbar-prevent-changes (&rest _)
(when company-box-debug-scrollbar
(message "[CHANGES] CURRENT-BUFFER=%s MIN-WIDTH=%s SAFE-MIN-WIDTH=%s MIN-SIZE=%s MIN-SIZE-IGNORE=%s"
Expand Down

0 comments on commit 97475e4

Please sign in to comment.