Skip to content

Commit f1967c7

Browse files
committed
remain intact
1 parent ca5596e commit f1967c7

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

lsp-ui-doc.el

+10-11
Original file line numberDiff line numberDiff line change
@@ -1037,17 +1037,16 @@ before, or if the new window is the minibuffer."
10371037
(defvar-local lsp-ui-doc--timer-on-changes nil)
10381038

10391039
(defun lsp-ui-doc--on-state-changed (_frame &optional on-idle)
1040-
"On state changed."
1041-
(when-let* ((frame (lsp-ui-doc--get-frame))
1042-
((frame-live-p frame))
1043-
((frame-visible-p frame))
1044-
((not (minibufferp (window-buffer))))
1045-
((or (not (eq (selected-window) (frame-parameter frame 'lsp-ui-doc--window-origin)))
1046-
(not (eq (window-buffer) (frame-parameter frame 'lsp-ui-doc--buffer-origin))))))
1047-
(if on-idle (lsp-ui-doc--hide-frame)
1048-
(lsp-ui-util-safe-kill-timer lsp-ui-doc--timer-on-changes)
1049-
(setq lsp-ui-doc--timer-on-changes
1050-
(run-with-idle-timer 0 nil (lambda nil (lsp-ui-doc--on-state-changed frame t)))))))
1040+
(-when-let* ((frame (lsp-ui-doc--get-frame)))
1041+
(and (frame-live-p frame)
1042+
(frame-visible-p frame)
1043+
(not (minibufferp (window-buffer)))
1044+
(or (not (eq (selected-window) (frame-parameter frame 'lsp-ui-doc--window-origin)))
1045+
(not (eq (window-buffer) (frame-parameter frame 'lsp-ui-doc--buffer-origin))))
1046+
(if on-idle (lsp-ui-doc--hide-frame)
1047+
(lsp-ui-util-safe-kill-timer lsp-ui-doc--timer-on-changes)
1048+
(setq lsp-ui-doc--timer-on-changes
1049+
(run-with-idle-timer 0 nil (lambda nil (lsp-ui-doc--on-state-changed frame t))))))))
10511050

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

0 commit comments

Comments
 (0)