changeset 4292:990f6ee7f527

(Fset_window_buffer): Clear window_end_{pos,valid}.
author Richard M. Stallman <rms@gnu.org>
date Mon, 26 Jul 1993 19:14:26 +0000
parents de0f38da99f5
children 99e31e531877
files src/window.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Mon Jul 26 18:40:03 1993 +0000
+++ b/src/window.c	Mon Jul 26 19:14:26 1993 +0000
@@ -480,9 +480,13 @@
 {
   Lisp_Object value;
   struct window *w = decode_window (window);
-  
+  Lisp_Object buf;
+
+  buf = w->buffer;
+  CHECK_BUFFER (buf, 0);
+
   XSET (value, Lisp_Int,
-	BUF_Z (current_buffer) - XFASTINT (w->window_end_pos));
+	BUF_Z (XBUFFER (buf)) - XFASTINT (w->window_end_pos));
 
   return value;
 }
@@ -1575,6 +1579,8 @@
     }
 
   w->buffer = buffer;
+  w->window_end_pos = 0;
+  w->window_end_valid = Qnil;
   w->hscroll = 0;
   Fset_marker (w->pointm,
 	       make_number (BUF_PT (XBUFFER (buffer))),