File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1247,6 +1247,7 @@ It is supposed to be called from `lsp-ui--toggle'"
1247
1247
(interactive )
1248
1248
(when-let* ((frame (lsp-ui-doc--get-frame))
1249
1249
(visible (lsp-ui-doc--frame-visible-p)))
1250
+ (remove-hook 'post-command-hook 'lsp-ui-doc--unfocus-frame-post-command )
1250
1251
(remove-hook 'post-command-hook 'lsp-ui-doc--hide-frame )
1251
1252
(set-frame-parameter frame 'lsp-ui-doc--no-focus nil )
1252
1253
(set-frame-parameter frame 'cursor-type t )
@@ -1263,8 +1264,14 @@ It is supposed to be called from `lsp-ui--toggle'"
1263
1264
(set-frame-parameter frame 'cursor-type nil )
1264
1265
(lsp-ui-doc--with-buffer
1265
1266
(setq cursor-type nil ))
1266
- (when lsp-ui-doc--from-mouse
1267
- (make-frame-invisible frame))))
1267
+ (if lsp-ui-doc--from-mouse
1268
+ (make-frame-invisible frame)
1269
+ (add-hook'post-command-hook 'lsp-ui-doc--unfocus-frame-post-command ))))
1270
+
1271
+ (defun lsp-ui-doc--unfocus-frame-post-command ()
1272
+ " Hide frame on the next post command after unfocus frame."
1273
+ (add-hook 'post-command-hook 'lsp-ui-doc--hide-frame )
1274
+ (remove-hook 'post-command-hook 'lsp-ui-doc--unfocus-frame-post-command ))
1268
1275
1269
1276
(provide 'lsp-ui-doc )
1270
1277
; ;; lsp-ui-doc.el ends here
You can’t perform that action at this time.
0 commit comments