aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-04 12:53:51 +0000
committerGerd Moellmann2001-01-04 12:53:51 +0000
commit85fe3b5e15a4c40ed52b10959933421f32578be2 (patch)
tree3ad9083d76755d45148a377610e778266b625053 /src
parent7aa2024d50b76c705c5a37e1ac64ad7327fcd1cf (diff)
downloademacs-85fe3b5e15a4c40ed52b10959933421f32578be2.tar.gz
emacs-85fe3b5e15a4c40ed52b10959933421f32578be2.zip
(Fdelete_other_windows): Set window's window_end_valid
to nil when changing the window's start. Don't change the window's start when its top position hasn't changed. If we do, this will set the window's optional_new_start, which act's like a force_start during redisplay with C-x 1 M-> under particular circumstances (see report from Per Starback to emacs-pretest-bug from 2000-12-13.). (Fdelete_other_windows): Set window's window_end_valid to nil when changing the window's start.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/window.c11
2 files changed, 16 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d218f86eeb8..38ddb31ee93 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12001-01-04 Gerd Moellmann <gerd@gnu.org>
2
3 * window.c (Fdelete_other_windows): Set window's window_end_valid
4 to nil when changing the window's start. Don't change the
5 window's start when its top position hasn't changed. If we do,
6 this will set the window's optional_new_start, which act's like a
7 force_start during redisplay with C-x 1 M-> under particular
8 circumstances (see report from Per Starback to emacs-pretest-bug
9 from 2000-12-13.).
10
12001-01-03 Gerd Moellmann <gerd@gnu.org> 112001-01-03 Gerd Moellmann <gerd@gnu.org>
2 12
3 * xdisp.c (forward_to_next_line_start): Reset it->c if taking the 13 * xdisp.c (forward_to_next_line_start): Reset it->c if taking the
diff --git a/src/window.c b/src/window.c
index 5d779026bad..16455f59220 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1691,8 +1691,7 @@ window_list_1 (window, minibuf, all_frames)
1691 Qnil, look at just the selected frame; 1691 Qnil, look at just the selected frame;
1692 Qvisible, look at visible frames; 1692 Qvisible, look at visible frames;
1693 a frame, just look at windows on that frame. 1693 a frame, just look at windows on that frame.
1694 If MINI is non-zero, perform the operation on minibuffer windows too. 1694 If MINI is non-zero, perform the operation on minibuffer windows too. */
1695*/
1696 1695
1697enum window_loop 1696enum window_loop
1698{ 1697{
@@ -1989,13 +1988,12 @@ value is reasonable when this function is called.")
1989{ 1988{
1990 struct window *w; 1989 struct window *w;
1991 int startpos; 1990 int startpos;
1992 int top; 1991 int top, new_top;
1993 1992
1994 if (NILP (window)) 1993 if (NILP (window))
1995 window = selected_window; 1994 window = selected_window;
1996 else 1995 else
1997 CHECK_LIVE_WINDOW (window, 0); 1996 CHECK_LIVE_WINDOW (window, 0);
1998
1999 w = XWINDOW (window); 1997 w = XWINDOW (window);
2000 1998
2001 startpos = marker_position (w->start); 1999 startpos = marker_position (w->start);
@@ -2011,7 +2009,9 @@ value is reasonable when this function is called.")
2011 on the frame. But don't try to do this if the window start is 2009 on the frame. But don't try to do this if the window start is
2012 outside the visible portion (as might happen when the display is 2010 outside the visible portion (as might happen when the display is
2013 not current, due to typeahead). */ 2011 not current, due to typeahead). */
2014 if (startpos >= BUF_BEGV (XBUFFER (w->buffer)) 2012 new_top = XFASTINT (w->top) - FRAME_TOP_MARGIN (XFRAME (WINDOW_FRAME (w)));
2013 if (new_top != top
2014 && startpos >= BUF_BEGV (XBUFFER (w->buffer))
2015 && startpos <= BUF_ZV (XBUFFER (w->buffer))) 2015 && startpos <= BUF_ZV (XBUFFER (w->buffer)))
2016 { 2016 {
2017 struct position pos; 2017 struct position pos;
@@ -2023,6 +2023,7 @@ value is reasonable when this function is called.")
2023 pos = *vmotion (startpos, -top, w); 2023 pos = *vmotion (startpos, -top, w);
2024 2024
2025 set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); 2025 set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos);
2026 w->window_end_valid = Qnil;
2026 w->start_at_line_beg = ((pos.bytepos == BEGV_BYTE 2027 w->start_at_line_beg = ((pos.bytepos == BEGV_BYTE
2027 || FETCH_BYTE (pos.bytepos - 1) == '\n') ? Qt 2028 || FETCH_BYTE (pos.bytepos - 1) == '\n') ? Qt
2028 : Qnil); 2029 : Qnil);