From: Chong Yidong Date: Mon, 28 Jul 2008 19:37:08 +0000 (+0000) Subject: (redisplay_window): Check return value of X-Git-Tag: emacs-pretest-23.0.90~3837 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ccd485aaa272671c490edddd4a0298f95c2f8bfc;p=emacs.git (redisplay_window): Check return value of compute_window_start_on_continuation_line before forcing a window start. --- diff --git a/src/xdisp.c b/src/xdisp.c index 88882cf1a1d..431541c608d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13658,11 +13658,16 @@ redisplay_window (window, just_this_one_p) && NILP (do_mouse_tracking) && CHARPOS (startp) > BEGV && CHARPOS (startp) > BEG + beg_unchanged - && CHARPOS (startp) <= Z - end_unchanged) + && CHARPOS (startp) <= Z - end_unchanged + /* Even if w->start_at_line_beg is nil, a new window may + start at a line_beg, since that's how set_buffer_window + sets it. So, we need to check the return value of + compute_window_start_on_continuation_line. (See also + bug#197). */ + && XMARKER (w->start)->buffer == current_buffer + && compute_window_start_on_continuation_line (w)) { w->force_start = Qt; - if (XMARKER (w->start)->buffer == current_buffer) - compute_window_start_on_continuation_line (w); SET_TEXT_POS_FROM_MARKER (startp, w->start); goto force_start; }