changeset 48013:d3416b0f856c

(toggle-truncate-lines): When turning off truncation, clear out the hscroll value in this buffer's windows. (display-message-or-buffer): Don't display empty output in the echo area.
author Richard M. Stallman <rms@gnu.org>
date Sat, 26 Oct 2002 22:40:31 +0000
parents 73c9cc6e8538
children fc643b6ab4f4
files lisp/simple.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sat Oct 26 22:37:54 2002 +0000
+++ b/lisp/simple.el	Sat Oct 26 22:40:31 2002 +0000
@@ -1343,7 +1343,8 @@
 		  (if (= (buffer-size) 0)
 		      0
 		    (count-lines (point-min) (point-max)))))
-	     (cond ((and (or (<= lines 1)
+	     (cond ((= lines 0))
+		   ((and (or (<= lines 1)
 			     (<= lines
 				 (if resize-mini-windows
 				     (cond ((floatp max-mini-window-height)
@@ -3234,6 +3235,12 @@
 	    (not truncate-lines)
 	  (> (prefix-numeric-value arg) 0)))
   (force-mode-line-update)
+  (unless truncate-lines
+    (let ((buffer (current-buffer)))
+      (walk-windows (lambda (window)
+		      (if (eq buffer (window-buffer window))
+			  (set-window-hscroll window 0)))
+		    nil t)))
   (message "Truncate long lines %s"
 	   (if truncate-lines "enabled" "disabled")))