Skip to content

Commit

Permalink
remain intact
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed May 14, 2024
1 parent ca5596e commit 14e0d9f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lsp-ui-doc.el
Original file line number Diff line number Diff line change
Expand Up @@ -1038,16 +1038,16 @@ before, or if the new window is the minibuffer."

(defun lsp-ui-doc--on-state-changed (_frame &optional on-idle)
"On state changed."
(when-let* ((frame (lsp-ui-doc--get-frame))
((frame-live-p frame))
((frame-visible-p frame))
((not (minibufferp (window-buffer))))
((or (not (eq (selected-window) (frame-parameter frame 'lsp-ui-doc--window-origin)))
(not (eq (window-buffer) (frame-parameter frame 'lsp-ui-doc--buffer-origin))))))
(if on-idle (lsp-ui-doc--hide-frame)
(lsp-ui-util-safe-kill-timer lsp-ui-doc--timer-on-changes)
(setq lsp-ui-doc--timer-on-changes
(run-with-idle-timer 0 nil (lambda nil (lsp-ui-doc--on-state-changed frame t)))))))
(-when-let* ((frame (lsp-ui-doc--get-frame)))
(and (frame-live-p frame)
(frame-visible-p frame)
(not (minibufferp (window-buffer)))
(or (not (eq (selected-window) (frame-parameter frame 'lsp-ui-doc--window-origin)))
(not (eq (window-buffer) (frame-parameter frame 'lsp-ui-doc--buffer-origin))))
(if on-idle (lsp-ui-doc--hide-frame)
(lsp-ui-util-safe-kill-timer lsp-ui-doc--timer-on-changes)
(setq lsp-ui-doc--timer-on-changes
(run-with-idle-timer 0 nil (lambda nil (lsp-ui-doc--on-state-changed frame t))))))))

(advice-add 'load-theme :before (lambda (&rest _) (lsp-ui-doc--delete-frame)))

Expand Down

0 comments on commit 14e0d9f

Please sign in to comment.