popup-el
popup-el copied to clipboard
Popup is disrupted when using scroll-bar with margin in right end.
Popup is disrupted in the following test code.
(ert-deftest popup-test-scroll-bar-right ()
(popup-test-with-temp-buffer
(insert (make-string (- (window-width) 1) ? ))
(let* ((popup-scroll-bar-foreground-char
(propertize "f" 'face 'popup-scroll-bar-foreground-face))
(popup-scroll-bar-background-char
(propertize "b" 'face 'popup-scroll-bar-background-face))
(popup (popup-tip "Foo\nBar\nBaz\nFez\nOz"
:nowait t :height 3 :scroll-bar t :margin t)))
(with-current-buffer (popup-test-helper-get-overlays-buffer)
(let ((points (popup-test-helper-match-points
'("Foof" "Barb" "Bazb"))))
(should (equal (popup-test-helper-same-all-p
(popup-test-helper-points-to-columns points))
(- (window-width) 5)))
(should (eq (line-number-at-pos (car points)) 2))
)))))