Skip to content

Commit 2293f8c

Browse files
authored
feat: Partial scroll bars support (#774)
* feat: Partial scroll bars support * rev no-focus-on-map
1 parent 703fc51 commit 2293f8c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lsp-ui-doc.el

+6-3
Original file line numberDiff line numberDiff line change
@@ -516,17 +516,20 @@ FRAME just below the symbol at point."
516516
(if (< (car it) (window-start))
517517
(cons 0 0)
518518
(posn-x-y (posn-at-point (1- (window-end))))))))
519-
(frame-relative-symbol-x (+ start-x x (* (frame-char-width) 2)))
520-
(frame-relative-symbol-y (+ start-y y))
519+
(char-width (frame-char-width))
521520
(char-height (frame-char-height))
521+
(sbw (or (window-scroll-bar-width) 0))
522+
(sbh (or (window-scroll-bar-height) 0))
523+
(frame-relative-symbol-x (+ start-x x (* char-width 2) sbw))
524+
(frame-relative-symbol-y (+ start-y y (- 0 sbh)))
522525
;; Make sure the frame is positioned horizontally such that
523526
;; it does not go beyond the frame boundaries.
524527
(frame-x (or (and (<= (frame-outer-width) (+ frame-relative-symbol-x width))
525528
(- x (- (+ frame-relative-symbol-x width)
526529
(frame-outer-width))))
527530
x))
528531
(frame-y (+ (or (and (<= height frame-relative-symbol-y)
529-
(- y height))
532+
(- y height sbh))
530533
(+ y char-height))
531534
(if (fboundp 'window-tab-line-height) (window-tab-line-height) 0))))
532535
(cons (+ start-x frame-x) (+ start-y frame-y))))

0 commit comments

Comments
 (0)