# HG changeset patch # User Eli Zaretskii # Date 1139089700 0 # Node ID 1c23b04a7a2cef98f64c852af1ab64982bbae09e # Parent e7bf4f8cbe2a5c364d514191f54bbab004f24151 (display-message-or-buffer): Compare the number of characters to the frame width when determining whether a 1-line message string will fit in the echo area. diff -r e7bf4f8cbe2a -r 1c23b04a7a2c lisp/simple.el --- a/lisp/simple.el Sat Feb 04 12:19:27 2006 +0000 +++ b/lisp/simple.el Sat Feb 04 21:48:20 2006 +0000 @@ -1901,11 +1901,14 @@ Optional arguments NOT-THIS-WINDOW and FRAME are as for `display-buffer', and only used if a buffer is displayed." - (cond ((and (stringp message) (not (string-match "\n" message))) + (cond ((and (stringp message) + (not (string-match "\n" message)) + (<= (length message) (frame-width))) ;; Trivial case where we can use the echo area (message "%s" message)) ((and (stringp message) - (= (string-match "\n" message) (1- (length message)))) + (= (string-match "\n" message) (1- (length message))) + (<= (1- (length message)) (frame-width))) ;; Trivial case where we can just remove single trailing newline (message "%s" (substring message 0 (1- (length message))))) (t