mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-11 13:07:28 -05:00
tools/eval: fix popup when +overlay is disabled
This commit is contained in:
@ -21,6 +21,7 @@
|
|||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +eval-display-results-in-overlay (output &optional source-buffer)
|
(defun +eval-display-results-in-overlay (output &optional source-buffer)
|
||||||
"Display OUTPUT in a floating overlay next to the cursor."
|
"Display OUTPUT in a floating overlay next to the cursor."
|
||||||
|
(require 'eros)
|
||||||
(let ((this-command #'+eval/buffer-or-region)
|
(let ((this-command #'+eval/buffer-or-region)
|
||||||
eros-overlays-use-font-lock)
|
eros-overlays-use-font-lock)
|
||||||
(with-current-buffer (or source-buffer (current-buffer))
|
(with-current-buffer (or source-buffer (current-buffer))
|
||||||
@ -31,12 +32,12 @@
|
|||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +eval-display-results (output &optional source-buffer)
|
(defun +eval-display-results (output &optional source-buffer)
|
||||||
"Display OUTPUT in an overlay or a popup buffer."
|
"Display OUTPUT in an overlay or a popup buffer."
|
||||||
(funcall (if (and (or current-prefix-arg
|
(funcall (if (or current-prefix-arg
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert output)
|
(insert output)
|
||||||
(>= (count-lines (point-min) (point-max))
|
(>= (count-lines (point-min) (point-max))
|
||||||
+eval-overlay-max-lines)))
|
+eval-overlay-max-lines))
|
||||||
(require 'eros nil t))
|
(not (require 'eros nil t)))
|
||||||
#'+eval-display-results-in-popup
|
#'+eval-display-results-in-popup
|
||||||
#'+eval-display-results-in-overlay)
|
#'+eval-display-results-in-overlay)
|
||||||
output source-buffer)
|
output source-buffer)
|
||||||
|
Reference in New Issue
Block a user