Michelson emacs-mode: auto resize type buffer.
This commit is contained in:
parent
4a9fee3f11
commit
2e3d664069
@ -326,7 +326,27 @@
|
||||
nil
|
||||
(setq message (concat message "\n")))
|
||||
(setq message (concat message (cadr (cdr elt)))))))
|
||||
(display-message-or-buffer message "*Michelson*"))))
|
||||
(if (string= message "")
|
||||
(setq message "\n No instruction at point."))
|
||||
(let
|
||||
((message-window
|
||||
(display-buffer-below-selected
|
||||
(get-buffer-create "*Michelson*") nil))
|
||||
(lines 0))
|
||||
(save-excursion
|
||||
(set-buffer "*Michelson*")
|
||||
(toggle-read-only nil)
|
||||
(erase-buffer)
|
||||
(insert message)
|
||||
(toggle-read-only t)
|
||||
(beginning-of-buffer)
|
||||
(while (not (eobp))
|
||||
(vertical-motion 1)
|
||||
(setq lines (+ 1 lines)))
|
||||
(window-resize
|
||||
message-window
|
||||
(+ (- (max 4 lines)
|
||||
(window-size message-window)) 1)))))))
|
||||
|
||||
(defun michelson-update-minibuffer-info ()
|
||||
(when (nth 2 michelson-state) (cancel-timer (nth 2 michelson-state)))
|
||||
|
Loading…
Reference in New Issue
Block a user