Skip to content

Commit

Permalink
feat: Partial scroll bars support (#774)
Browse files Browse the repository at this point in the history
* feat: Partial scroll bars support

* rev no-focus-on-map
  • Loading branch information
jcs090218 authored Apr 23, 2024
1 parent 703fc51 commit 2293f8c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lsp-ui-doc.el
Original file line number Diff line number Diff line change
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 2293f8c

Please sign in to comment.