changeset 48898:3b18ddd398f8

(Fset_window_configuration): Set old_point to correct value when new_current_buffer == current_buffer.
author David Kastrup <dak@gnu.org>
date Thu, 19 Dec 2002 16:26:29 +0000
parents 46d61ebad229
children d684f5bc91b8
files src/window.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Thu Dec 19 16:25:44 2002 +0000
+++ b/src/window.c	Thu Dec 19 16:26:29 2002 +0000
@@ -4980,7 +4980,12 @@
   if (NILP (XBUFFER (new_current_buffer)->name))
     new_current_buffer = Qnil;
   else
-    old_point = BUF_PT (XBUFFER (new_current_buffer));
+    {
+      if (XBUFFER (new_current_buffer) == current_buffer)
+	old_point = PT;
+      else
+	old_point = BUF_PT (XBUFFER (new_current_buffer));
+    }
 
   frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame;
   f = XFRAME (frame);