Browse Source

Improve the output of values in the minibuffer

workspaces
Nicolas Petton 4 years ago
parent
commit
dee40aef24
Signed by: nico GPG Key ID: 233587A47C207910
3 changed files with 9 additions and 3 deletions
  1. +1
    -1
      jade-debugger.el
  2. +2
    -2
      jade-interaction.el
  3. +6
    -0
      jade-render.el

+ 1
- 1
jade-debugger.el View File

@ -250,7 +250,7 @@ Evaluation happens in the context of the current call frame."
(jade-backend-evaluate (jade-backend)
expression
(lambda (value _error)
(message (jade-description-string value)))))
(message "%s" (jade-render-value-to-string value)))))
(defun jade-debugger-eval-last-node ()
"Evaluate the node before point."


+ 2
- 2
jade-interaction.el View File

@ -53,11 +53,11 @@ current buffer."
(jade-interaction--ensure-connection)
(jade-eval (js2-node-string (jade-interaction-node-before-point))
(lambda (value _error)
(let ((description (jade-description-string value)))
(let ((description (jade-render-value-to-string value)))
(if arg
(save-excursion
(insert description))
(message description))))))
(message "%s" description))))))
(defun jade-reload ()
"Reload the page."


+ 6
- 0
jade-render.el View File

@ -47,6 +47,12 @@ with a link to an inspector on that object."
(jade-render-object-link value)
(jade-render-description value)))
(defun jade-render-value-to-string (value)
"Return a string representation of VALUE."
(with-temp-buffer
(jade-render-value value)
(buffer-string)))
(defun jade-render-description (value)
(let ((description (jade-description-string value)))
(insert


Loading…
Cancel
Save