From 9b1c6beb7c76e5ca184ac980c4bc9562c181031c Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sun, 7 Aug 2005 12:33:19 +0000 Subject: Update years in copyright notice; nfc. --- src/fringe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/fringe.c') diff --git a/src/fringe.c b/src/fringe.c index 082aabc37a1..f9120d4c74b 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1,6 +1,7 @@ /* Fringe handling (split from xdisp.c). - Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, + 1998, 1999, 2000, 2000, 2001, 2002, 2003, 2004, + 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. -- cgit v1.2.1 From 1531a21fe1bd1221b3e92c714b9b8369541fb993 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 21 Aug 2005 20:57:42 +0000 Subject: (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg; if non-zero, don't update current row fringes, and return 0. --- src/fringe.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/fringe.c') diff --git a/src/fringe.c b/src/fringe.c index f9120d4c74b..4b715844084 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -777,13 +777,14 @@ draw_window_fringes (w, no_fringe) /* Recalculate the bitmaps to show in the fringes of window W. - If FORCE_P is 0, only mark rows with modified bitmaps for update in - redraw_fringe_bitmaps_p; else mark all rows for update. */ + Only mark rows with modified bitmaps for update in redraw_fringe_bitmaps_p. + + If KEEP_CURRENT_P is 0, update current_matrix too. */ int -update_window_fringes (w, force_p) +update_window_fringes (w, keep_current_p) struct window *w; - int force_p; + int keep_current_p; { struct glyph_row *row, *cur = 0; int yb = window_text_bottom_y (w); @@ -943,8 +944,7 @@ update_window_fringes (w, force_p) else right = NO_FRINGE_BITMAP; - if (force_p - || row->y != cur->y + if (row->y != cur->y || row->visible_height != cur->visible_height || row->ends_at_zv_p != cur->ends_at_zv_p || left != cur->left_fringe_bitmap @@ -953,11 +953,15 @@ update_window_fringes (w, force_p) || right_face_id != cur->right_fringe_face_id || cur->redraw_fringe_bitmaps_p) { - redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; - cur->left_fringe_bitmap = left; - cur->right_fringe_bitmap = right; - cur->left_fringe_face_id = left_face_id; - cur->right_fringe_face_id = right_face_id; + redraw_p = row->redraw_fringe_bitmaps_p = 1; + if (!keep_current_p) + { + cur->redraw_fringe_bitmaps_p = 1; + cur->left_fringe_bitmap = left; + cur->right_fringe_bitmap = right; + cur->left_fringe_face_id = left_face_id; + cur->right_fringe_face_id = right_face_id; + } } if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap) @@ -975,7 +979,7 @@ update_window_fringes (w, force_p) row[-1].redraw_fringe_bitmaps_p = cur[-1].redraw_fringe_bitmaps_p = 1; } - return redraw_p; + return redraw_p && !keep_current_p; } -- cgit v1.2.1 From 45c5c967aa6c71adc69bc7cc7367f12a1ca56a1c Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 21 Aug 2005 21:48:22 +0000 Subject: * fringe.c (update_window_fringes): Only put TOP and BOTTOM bitmaps on fully visible rows. --- src/fringe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/fringe.c') diff --git a/src/fringe.c b/src/fringe.c index 4b715844084..754ee68ca56 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -850,7 +850,8 @@ update_window_fringes (w, keep_current_p) { if (!done_top) { - if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer))) + if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)) + && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row)) row->indicate_bob_p = !NILP (boundary_top); else row->indicate_top_line_p = !NILP (arrow_top); @@ -859,7 +860,8 @@ update_window_fringes (w, keep_current_p) if (!done_bot) { - if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))) + if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)) + && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row)) row->indicate_eob_p = !NILP (boundary_bot), done_bot = 1; else if (y + row->height >= yb) row->indicate_bottom_line_p = !NILP (arrow_bot), done_bot = 1; -- cgit v1.2.1