changeset 20627:0753fa7a67f3

(Fselect_window): Don't set OW->pointm if OW->buffer is nil. (Fset_window_configuration): Set old selected window's pointm.
author Richard M. Stallman <rms@gnu.org>
date Fri, 09 Jan 1998 23:18:35 +0000
parents a39bcf9c0e1e
children 05919533e157
files src/window.c
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Fri Jan 09 23:17:52 1998 +0000
+++ b/src/window.c	Fri Jan 09 23:18:35 1998 +0000
@@ -1963,9 +1963,10 @@
   if (EQ (window, selected_window))
     return window;
 
-  set_marker_both (ow->pointm, ow->buffer,
-		   BUF_PT (XBUFFER (ow->buffer)),
-		   BUF_PT_BYTE (XBUFFER (ow->buffer)));
+  if (! NILP (ow->buffer))
+    set_marker_both (ow->pointm, ow->buffer,
+		     BUF_PT (XBUFFER (ow->buffer)),
+		     BUF_PT_BYTE (XBUFFER (ow->buffer)));
 
   selected_window = window;
   if (XFRAME (WINDOW_FRAME (w)) != selected_frame)
@@ -3275,6 +3276,15 @@
 	x_set_menu_bar_lines (f, data->frame_menu_bar_lines, 0);
 #endif
 
+      if (! NILP (XWINDOW (selected_window)->buffer))
+	{
+	  w = XWINDOW (selected_window);
+	  set_marker_both (w->pointm,
+			   w->buffer,
+			   BUF_PT (XBUFFER (w->buffer)),
+			   BUF_PT_BYTE (XBUFFER (w->buffer)));
+	}
+
       windows_or_buffers_changed++;
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;