Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Revert 'Hide doc frame on next post comman' #778

Merged
merged 2 commits into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions lsp-ui-doc.el
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,6 @@ It is supposed to be called from `lsp-ui--toggle'"
(interactive)
(when-let* ((frame (lsp-ui-doc--get-frame))
(visible (lsp-ui-doc--frame-visible-p)))
(remove-hook 'post-command-hook 'lsp-ui-doc--unfocus-frame-post-command)
(remove-hook 'post-command-hook 'lsp-ui-doc--hide-frame)
(set-frame-parameter frame 'lsp-ui-doc--no-focus nil)
(set-frame-parameter frame 'cursor-type t)
Expand All @@ -1264,14 +1263,8 @@ It is supposed to be called from `lsp-ui--toggle'"
(set-frame-parameter frame 'cursor-type nil)
(lsp-ui-doc--with-buffer
(setq cursor-type nil))
(if lsp-ui-doc--from-mouse
(make-frame-invisible frame)
(add-hook'post-command-hook 'lsp-ui-doc--unfocus-frame-post-command))))

(defun lsp-ui-doc--unfocus-frame-post-command ()
"Hide frame on the next post command after unfocus frame."
(add-hook 'post-command-hook 'lsp-ui-doc--hide-frame)
(remove-hook 'post-command-hook 'lsp-ui-doc--unfocus-frame-post-command))
(when lsp-ui-doc--from-mouse
(make-frame-invisible frame))))

(provide 'lsp-ui-doc)
;;; lsp-ui-doc.el ends here
Loading