Skip to content

Commit

Permalink
feat: Partial scroll bars support
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Apr 23, 2024
1 parent 703fc51 commit 71dcb5d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lsp-ui-doc.el
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Only the `background' is used in this face."

(defvar lsp-ui-doc-frame-parameters
'((left . -1)
(no-focus-on-map . t)
(no-focus-on-map . nil)
(min-width . 0)
(width . 0)
(min-height . 0)
Expand Down Expand Up @@ -516,17 +516,20 @@ FRAME just below the symbol at point."
(if (< (car it) (window-start))
(cons 0 0)
(posn-x-y (posn-at-point (1- (window-end))))))))
(frame-relative-symbol-x (+ start-x x (* (frame-char-width) 2)))
(frame-relative-symbol-y (+ start-y y))
(char-width (frame-char-width))
(char-height (frame-char-height))
(sbw (or (window-scroll-bar-width) 0))
(sbh (or (window-scroll-bar-height) 0))
(frame-relative-symbol-x (+ start-x x (* char-width 2) sbw))
(frame-relative-symbol-y (+ start-y y (- 0 sbh)))
;; Make sure the frame is positioned horizontally such that
;; it does not go beyond the frame boundaries.
(frame-x (or (and (<= (frame-outer-width) (+ frame-relative-symbol-x width))
(- x (- (+ frame-relative-symbol-x width)
(frame-outer-width))))
x))
(frame-y (+ (or (and (<= height frame-relative-symbol-y)
(- y height))
(- y height sbh))
(+ y char-height))
(if (fboundp 'window-tab-line-height) (window-tab-line-height) 0))))
(cons (+ start-x frame-x) (+ start-y frame-y))))
Expand Down

0 comments on commit 71dcb5d

Please sign in to comment.