Commits

camlspotter  committed 80d839e

elisp bugfix

  • Participants
  • Parent commits 11d3ae7
  • Branches ocamlspot-trunk

Comments (0)

Files changed (1)

File ocamlspot/ocamlspot.el

       (if (or (<= lines  1)
               (<= lines max-echo-height))
           (progn
-            (message (buffer-string))
-            mes)
+            (let ((mes (buffer-string)))
+              (message mes)
+              mes))
         (if may-pop ; buffer layout may change... no way to recover ?
             (progn
               (display-buffer ocamlspot-message-buffer)
           ;; display the first max-echo-height lines
           (let ((lines (max 1 (1- max-echo-height))))
             (goto-char (point-min))
-            (forward-visible-line (max 1 (1- max-echo-height)))
+            (forward-visible-line (max 1 (- max-echo-height 2)))
             (message (concat (buffer-substring (point-min) (point)) "... Result is too long. Truncated."))
             nil))))))