aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-10-07 21:57:53 +0000
committerKim F. Storm2004-10-07 21:57:53 +0000
commit11491cbb2a3544c16169b7e32b04311a1c22ddd0 (patch)
tree73fd13d42a2f94971873b22a417cc51641005988 /src
parent98c95e4e0dc6fcd44991416dc72c701b4a9c503b (diff)
downloademacs-11491cbb2a3544c16169b7e32b04311a1c22ddd0.tar.gz
emacs-11491cbb2a3544c16169b7e32b04311a1c22ddd0.zip
(draw_window_fringes): Return value now indicates if
any fringe bitmaps were redrawn (or there are no fringes).
Diffstat (limited to 'src')
-rw-r--r--src/fringe.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/fringe.c b/src/fringe.c
index 71057e1b5cb..000095f470a 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -722,19 +722,35 @@ draw_row_fringe_bitmaps (w, row)
722} 722}
723 723
724/* Draw the fringes of window W. Only fringes for rows marked for 724/* Draw the fringes of window W. Only fringes for rows marked for
725 update in redraw_fringe_bitmaps_p are drawn. */ 725 update in redraw_fringe_bitmaps_p are drawn.
726 726
727void 727 Return >0 if left or right fringe was redrawn in any way.
728draw_window_fringes (w) 728
729 If NO_FRINGE is non-zero, also return >0 if either fringe has zero width.
730
731 A return value >0 indicates that the vertical line between windows
732 needs update (as it may be drawn in the fringe).
733*/
734
735int
736draw_window_fringes (w, no_fringe)
729 struct window *w; 737 struct window *w;
738 int no_fringe;
730{ 739{
731 struct glyph_row *row; 740 struct glyph_row *row;
732 int yb = window_text_bottom_y (w); 741 int yb = window_text_bottom_y (w);
733 int nrows = w->current_matrix->nrows; 742 int nrows = w->current_matrix->nrows;
734 int y = 0, rn; 743 int y = 0, rn;
744 int updated = 0;
735 745
736 if (w->pseudo_window_p) 746 if (w->pseudo_window_p)
737 return; 747 return 0;
748
749 /* Must draw line if no fringe */
750 if (no_fringe
751 && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0
752 || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0))
753 updated++;
738 754
739 for (y = 0, rn = 0, row = w->current_matrix->rows; 755 for (y = 0, rn = 0, row = w->current_matrix->rows;
740 y < yb && rn < nrows; 756 y < yb && rn < nrows;
@@ -744,7 +760,10 @@ draw_window_fringes (w)
744 continue; 760 continue;
745 draw_row_fringe_bitmaps (w, row); 761 draw_row_fringe_bitmaps (w, row);
746 row->redraw_fringe_bitmaps_p = 0; 762 row->redraw_fringe_bitmaps_p = 0;
763 updated++;
747 } 764 }
765
766 return updated;
748} 767}
749 768
750 769
@@ -950,11 +969,7 @@ update_window_fringes (w, force_p)
950 Typically, we add an equal amount (+/- 1 pixel) to each fringe, 969 Typically, we add an equal amount (+/- 1 pixel) to each fringe,
951 but a negative width value is taken literally (after negating it). 970 but a negative width value is taken literally (after negating it).
952 971
953 We never make the fringes narrower than specified. It is planned 972 We never make the fringes narrower than specified.
954 to make fringe bitmaps customizable and expandable, and at that
955 time, the user will typically specify the minimum number of pixels
956 needed for his bitmaps, so we shouldn't select anything less than
957 what is specified.
958*/ 973*/
959 974
960void 975void