emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/window.c


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/window.c
Date: Tue, 12 Apr 2005 18:52:54 -0400

Index: emacs/src/window.c
diff -c emacs/src/window.c:1.497 emacs/src/window.c:1.498
*** emacs/src/window.c:1.497    Sun Apr 10 22:02:41 2005
--- emacs/src/window.c  Tue Apr 12 22:52:51 2005
***************
*** 1,7 ****
  /* Window creation, deletion and examination for GNU Emacs.
     Does not include redisplay.
!    Copyright (C) 1985,86,87, 1993,94,95,96,97,98, 2000,01,02,03,04
!    Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
--- 1,7 ----
  /* Window creation, deletion and examination for GNU Emacs.
     Does not include redisplay.
!    Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
!      2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
***************
*** 5594,5600 ****
        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;
--- 5594,5613 ----
        if (XBUFFER (new_current_buffer) == current_buffer)
        old_point = PT;
        else
!       /* BUF_PT (XBUFFER (new_current_buffer)) gives us the position of
!          point in new_current_buffer as of the last time this buffer was
!          used.  This can be non-deterministic since it can be changed by
!          things like jit-lock by mere temporary selection of some random
!          window that happens to show this buffer.
!          So if possible we want this arbitrary choice of "which point" to
!          be the one from the to-be-selected-window so as to prevent this
!          window's cursor from being copied from another window.  */
!       if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)
!           /* If current_window = selected_window, its point is in BUF_PT.  */
!           && !EQ (selected_window, data->current_window))
!         old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos;
!       else
!         old_point = BUF_PT (XBUFFER (new_current_buffer));
      }
  
    frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]