diff --git a/lsp-ui-doc.el b/lsp-ui-doc.el index 15468c5a..a3508172 100644 --- a/lsp-ui-doc.el +++ b/lsp-ui-doc.el @@ -501,7 +501,7 @@ We don't extract the string that `lps-line' is already displaying." (lsp-ui-doc--with-buffer (fill-region (point-min) (point-max))))))) -(defun lsp-ui-doc--mv-at-point (width height start-x start-y) +(defun lsp-ui-doc--mv-at-point (frame width height start-x start-y) "Return position of FRAME to be where the point is. WIDTH is the child frame width. HEIGHT is the child frame height. @@ -518,8 +518,8 @@ FRAME just below the symbol at point." (posn-x-y (posn-at-point (1- (window-end)))))))) (char-width (frame-char-width)) (char-height (frame-char-height)) - (sbw (or (window-scroll-bar-width) 0)) - (sbh (or (window-scroll-bar-height) 0)) + (sbw (with-selected-frame frame (or (window-scroll-bar-width) 0))) + (sbh (with-selected-frame frame (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 @@ -555,7 +555,7 @@ FRAME just below the symbol at point." ('frame (frame-pixel-width)) ('window right))) ((left . top) (if (eq lsp-ui-doc-position 'at-point) - (lsp-ui-doc--mv-at-point width height left top) + (lsp-ui-doc--mv-at-point frame width height left top) (cons (pcase lsp-ui-doc-side ('right (max (- frame-right width char-w) 10)) ('left 10)) diff --git a/lsp-ui-util.el b/lsp-ui-util.el index a5d92f2e..169dc133 100644 --- a/lsp-ui-util.el +++ b/lsp-ui-util.el @@ -1,11 +1,6 @@ ;;; lsp-ui-util.el --- Utility module for Lsp-Ui -*- lexical-binding: t -*- -;; Copyright (C) 2020 Shen, Jen-Chieh - -;; Author: Jen-Chieh Shen -;; URL: https://github.com/emacs-lsp/lsp-ui -;; Keywords: languages, tools -;; Version: 6.2 +;; Copyright (C) 2020-2024 Shen, Jen-Chieh ;;; License ;; diff --git a/lsp-ui.el b/lsp-ui.el index 1a342fee..1f0ce92f 100644 --- a/lsp-ui.el +++ b/lsp-ui.el @@ -172,6 +172,5 @@ Both should have the form (FILENAME LINE COLUMN)." (cons idx (length refs))) (cons 0 0)))) - (provide 'lsp-ui) ;;; lsp-ui.el ends here