Skip to content

Commit bc05895

Browse files
authored
Move triggering of auto-hide to after display (#696)
Fixes: #695
1 parent 6cd0409 commit bc05895

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lsp-ui-doc.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,10 @@ BUFFER is the buffer where the request has been made."
961961
(-some->> contents
962962
lsp-ui-doc--extract
963963
(replace-regexp-in-string "\r" "")
964-
(replace-regexp-in-string " " " "))))
964+
(replace-regexp-in-string " " " ")))
965+
(when lsp-ui-doc--unfocus-frame-timer
966+
(cancel-timer lsp-ui-doc--unfocus-frame-timer))
967+
(add-hook 'post-command-hook 'lsp-ui-doc--glance-hide-frame))
965968
(lsp-ui-doc--hide-frame))))
966969

967970
(defun lsp-ui-doc--delete-frame ()
@@ -1179,10 +1182,7 @@ It is supposed to be called from `lsp-ui--toggle'"
11791182
"Trigger display hover information popup and hide it on next typing."
11801183
(interactive)
11811184
(let ((lsp-ui-doc-show-with-cursor t))
1182-
(lsp-ui-doc--make-request))
1183-
(when lsp-ui-doc--unfocus-frame-timer
1184-
(cancel-timer lsp-ui-doc--unfocus-frame-timer))
1185-
(add-hook 'post-command-hook 'lsp-ui-doc--glance-hide-frame))
1185+
(lsp-ui-doc--make-request)))
11861186

11871187
(define-minor-mode lsp-ui-doc-frame-mode
11881188
"Marker mode to add additional key bind for lsp-ui-doc-frame."

0 commit comments

Comments
 (0)