aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-08-21 20:57:42 +0000
committerKim F. Storm2005-08-21 20:57:42 +0000
commit4dadc1297ba91d58d2eb20d88174456cb858c3cf (patch)
treeb7418643cb62a0fca5e6d9df588d6d34d9c91465 /src
parent7c3f805b803e3636995d1a6a054fe08ec4591ee5 (diff)
downloademacs-4dadc1297ba91d58d2eb20d88174456cb858c3cf.tar.gz
emacs-4dadc1297ba91d58d2eb20d88174456cb858c3cf.zip
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
if non-zero, don't update current row fringes, and return 0.
Diffstat (limited to 'src')
-rw-r--r--src/fringe.c28
1 files changed, 16 insertions, 12 deletions
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)
777 777
778 778
779/* Recalculate the bitmaps to show in the fringes of window W. 779/* Recalculate the bitmaps to show in the fringes of window W.
780 If FORCE_P is 0, only mark rows with modified bitmaps for update in 780 Only mark rows with modified bitmaps for update in redraw_fringe_bitmaps_p.
781 redraw_fringe_bitmaps_p; else mark all rows for update. */ 781
782 If KEEP_CURRENT_P is 0, update current_matrix too. */
782 783
783int 784int
784update_window_fringes (w, force_p) 785update_window_fringes (w, keep_current_p)
785 struct window *w; 786 struct window *w;
786 int force_p; 787 int keep_current_p;
787{ 788{
788 struct glyph_row *row, *cur = 0; 789 struct glyph_row *row, *cur = 0;
789 int yb = window_text_bottom_y (w); 790 int yb = window_text_bottom_y (w);
@@ -943,8 +944,7 @@ update_window_fringes (w, force_p)
943 else 944 else
944 right = NO_FRINGE_BITMAP; 945 right = NO_FRINGE_BITMAP;
945 946
946 if (force_p 947 if (row->y != cur->y
947 || row->y != cur->y
948 || row->visible_height != cur->visible_height 948 || row->visible_height != cur->visible_height
949 || row->ends_at_zv_p != cur->ends_at_zv_p 949 || row->ends_at_zv_p != cur->ends_at_zv_p
950 || left != cur->left_fringe_bitmap 950 || left != cur->left_fringe_bitmap
@@ -953,11 +953,15 @@ update_window_fringes (w, force_p)
953 || right_face_id != cur->right_fringe_face_id 953 || right_face_id != cur->right_fringe_face_id
954 || cur->redraw_fringe_bitmaps_p) 954 || cur->redraw_fringe_bitmaps_p)
955 { 955 {
956 redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; 956 redraw_p = row->redraw_fringe_bitmaps_p = 1;
957 cur->left_fringe_bitmap = left; 957 if (!keep_current_p)
958 cur->right_fringe_bitmap = right; 958 {
959 cur->left_fringe_face_id = left_face_id; 959 cur->redraw_fringe_bitmaps_p = 1;
960 cur->right_fringe_face_id = right_face_id; 960 cur->left_fringe_bitmap = left;
961 cur->right_fringe_bitmap = right;
962 cur->left_fringe_face_id = left_face_id;
963 cur->right_fringe_face_id = right_face_id;
964 }
961 } 965 }
962 966
963 if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap) 967 if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap)
@@ -975,7 +979,7 @@ update_window_fringes (w, force_p)
975 row[-1].redraw_fringe_bitmaps_p = cur[-1].redraw_fringe_bitmaps_p = 1; 979 row[-1].redraw_fringe_bitmaps_p = cur[-1].redraw_fringe_bitmaps_p = 1;
976 } 980 }
977 981
978 return redraw_p; 982 return redraw_p && !keep_current_p;
979} 983}
980 984
981 985