From 608d20fb77237821c1645fbb834ec789e28ea35e Mon Sep 17 00:00:00 2001 From: Kien Nguyen Date: Sun, 28 Jun 2020 10:41:02 +0900 Subject: [PATCH] posframe-integration: dont create posframe on every request --- lsp-ui-doc.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lsp-ui-doc.el b/lsp-ui-doc.el index 5387949f..5ad94e54 100644 --- a/lsp-ui-doc.el +++ b/lsp-ui-doc.el @@ -607,8 +607,7 @@ HEIGHT is the documentation number of lines." (lsp-ui-doc--render-buffer) (if (lsp-ui-doc--inline-p) (lsp-ui-doc--inline) - (when (or (not lsp-ui-doc-use-webkit) - (not (lsp-ui-doc--get-frame))) + (unless lsp-ui-doc-use-webkit (lsp-ui-doc--set-frame (lsp-ui-doc--make-frame))) (unless (frame-visible-p (lsp-ui-doc--get-frame)) (make-frame-visible (lsp-ui-doc--get-frame)))))) @@ -624,7 +623,6 @@ The structure of INFO is defined in the documentation of `posframe-show'." (defun lsp-ui-doc--make-frame () "Create the child frame and return it." - (lsp-ui-doc--delete-frame) (let* ((before-make-frame-hook nil) (buffer-name (lsp-ui-doc--make-buffer-name)) (buffer (get-buffer-create buffer-name))