diff options
| author | Chong Yidong | 2008-07-28 19:37:08 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-07-28 19:37:08 +0000 |
| commit | ccd485aaa272671c490edddd4a0298f95c2f8bfc (patch) | |
| tree | 3b1c9dc56c6069eb64777eeeab70c9635c48b669 | |
| parent | fc2fe15116486d1904b5cb7df3e05717260223ac (diff) | |
| download | emacs-ccd485aaa272671c490edddd4a0298f95c2f8bfc.tar.gz emacs-ccd485aaa272671c490edddd4a0298f95c2f8bfc.zip | |
(redisplay_window): Check return value of
compute_window_start_on_continuation_line before forcing a window
start.
| -rw-r--r-- | src/xdisp.c | 11 |
1 files changed, 8 insertions, 3 deletions
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) | |||
| 13658 | && NILP (do_mouse_tracking) | 13658 | && NILP (do_mouse_tracking) |
| 13659 | && CHARPOS (startp) > BEGV | 13659 | && CHARPOS (startp) > BEGV |
| 13660 | && CHARPOS (startp) > BEG + beg_unchanged | 13660 | && CHARPOS (startp) > BEG + beg_unchanged |
| 13661 | && CHARPOS (startp) <= Z - end_unchanged) | 13661 | && CHARPOS (startp) <= Z - end_unchanged |
| 13662 | /* Even if w->start_at_line_beg is nil, a new window may | ||
| 13663 | start at a line_beg, since that's how set_buffer_window | ||
| 13664 | sets it. So, we need to check the return value of | ||
| 13665 | compute_window_start_on_continuation_line. (See also | ||
| 13666 | bug#197). */ | ||
| 13667 | && XMARKER (w->start)->buffer == current_buffer | ||
| 13668 | && compute_window_start_on_continuation_line (w)) | ||
| 13662 | { | 13669 | { |
| 13663 | w->force_start = Qt; | 13670 | w->force_start = Qt; |
| 13664 | if (XMARKER (w->start)->buffer == current_buffer) | ||
| 13665 | compute_window_start_on_continuation_line (w); | ||
| 13666 | SET_TEXT_POS_FROM_MARKER (startp, w->start); | 13671 | SET_TEXT_POS_FROM_MARKER (startp, w->start); |
| 13667 | goto force_start; | 13672 | goto force_start; |
| 13668 | } | 13673 | } |