From: Gerd Moellmann Date: Thu, 4 Jan 2001 12:53:51 +0000 (+0000) Subject: (Fdelete_other_windows): Set window's window_end_valid X-Git-Tag: emacs-pretest-21.0.95~127 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=85fe3b5e15a4c40ed52b10959933421f32578be2;p=emacs.git (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. --- diff --git a/src/ChangeLog b/src/ChangeLog index d218f86eeb8..38ddb31ee93 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2001-01-04 Gerd Moellmann + + * window.c (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.). + 2001-01-03 Gerd Moellmann * 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) Qnil, look at just the selected frame; Qvisible, look at visible frames; a frame, just look at windows on that frame. - If MINI is non-zero, perform the operation on minibuffer windows too. -*/ + If MINI is non-zero, perform the operation on minibuffer windows too. */ enum window_loop { @@ -1989,13 +1988,12 @@ value is reasonable when this function is called.") { struct window *w; int startpos; - int top; + int top, new_top; if (NILP (window)) window = selected_window; else CHECK_LIVE_WINDOW (window, 0); - w = XWINDOW (window); startpos = marker_position (w->start); @@ -2011,7 +2009,9 @@ value is reasonable when this function is called.") on the frame. But don't try to do this if the window start is outside the visible portion (as might happen when the display is not current, due to typeahead). */ - if (startpos >= BUF_BEGV (XBUFFER (w->buffer)) + new_top = XFASTINT (w->top) - FRAME_TOP_MARGIN (XFRAME (WINDOW_FRAME (w))); + if (new_top != top + && startpos >= BUF_BEGV (XBUFFER (w->buffer)) && startpos <= BUF_ZV (XBUFFER (w->buffer))) { struct position pos; @@ -2023,6 +2023,7 @@ value is reasonable when this function is called.") pos = *vmotion (startpos, -top, w); set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); + w->window_end_valid = Qnil; w->start_at_line_beg = ((pos.bytepos == BEGV_BYTE || FETCH_BYTE (pos.bytepos - 1) == '\n') ? Qt : Qnil);