aboutsummaryrefslogtreecommitdiffstats
path: root/src/fringe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fringe.c')
-rw-r--r--src/fringe.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/fringe.c b/src/fringe.c
index a4dc9433aff..5285d09dfb0 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1,5 +1,5 @@
1/* Fringe handling (split from xdisp.c). 1/* Fringe handling (split from xdisp.c).
2 Copyright (C) 1985-1988, 1993-1995, 1997-2011 Free Software Foundation, Inc. 2 Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -35,7 +35,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
35 Logical bitmaps are used internally to denote things like 35 Logical bitmaps are used internally to denote things like
36 'end-of-buffer', 'left-truncation', 'overlay-arrow', etc. 36 'end-of-buffer', 'left-truncation', 'overlay-arrow', etc.
37 37
38 Physical bitmaps specify the visual appearence of the bitmap, 38 Physical bitmaps specify the visual appearance of the bitmap,
39 e.g. 'bottom-left-angle', 'left-arrow', 'left-triangle', etc. 39 e.g. 'bottom-left-angle', 'left-arrow', 'left-triangle', etc.
40 User defined bitmaps are physical bitmaps. 40 User defined bitmaps are physical bitmaps.
41 41
@@ -456,7 +456,7 @@ static struct fringe_bitmap standard_bitmaps[] =
456 456
457#define NO_FRINGE_BITMAP 0 457#define NO_FRINGE_BITMAP 0
458#define UNDEF_FRINGE_BITMAP 1 458#define UNDEF_FRINGE_BITMAP 1
459#define MAX_STANDARD_FRINGE_BITMAPS (sizeof(standard_bitmaps)/sizeof(standard_bitmaps[0])) 459#define MAX_STANDARD_FRINGE_BITMAPS (sizeof (standard_bitmaps)/sizeof (standard_bitmaps[0]))
460 460
461static struct fringe_bitmap **fringe_bitmaps; 461static struct fringe_bitmap **fringe_bitmaps;
462static Lisp_Object *fringe_faces; 462static Lisp_Object *fringe_faces;
@@ -928,7 +928,7 @@ update_window_fringes (struct window *w, int keep_current_p)
928 int top_ind_rn, bot_ind_rn; 928 int top_ind_rn, bot_ind_rn;
929 int top_ind_min_y, bot_ind_max_y; 929 int top_ind_min_y, bot_ind_max_y;
930 930
931 /* top_ind_rn is set to a nonnegative value whenver 931 /* top_ind_rn is set to a nonnegative value whenever
932 row->indicate_bob_p is set, so it's OK that top_row_ends_at_zv_p 932 row->indicate_bob_p is set, so it's OK that top_row_ends_at_zv_p
933 is not initialized here. Similarly for bot_ind_rn, 933 is not initialized here. Similarly for bot_ind_rn,
934 row->indicate_eob_p and bot_row_ends_at_zv_p. */ 934 row->indicate_eob_p and bot_row_ends_at_zv_p. */
@@ -1165,7 +1165,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1165 } 1165 }
1166 else if ((!row->reversed_p && row->truncated_on_left_p) 1166 else if ((!row->reversed_p && row->truncated_on_left_p)
1167 || (row->reversed_p && row->truncated_on_right_p)) 1167 || (row->reversed_p && row->truncated_on_right_p))
1168 left = LEFT_FRINGE(0, Qtruncation, 0); 1168 left = LEFT_FRINGE (0, Qtruncation, 0);
1169 else if (row->indicate_bob_p && EQ (boundary_top, Qleft)) 1169 else if (row->indicate_bob_p && EQ (boundary_top, Qleft))
1170 { 1170 {
1171 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) 1171 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
@@ -1610,22 +1610,25 @@ If BITMAP already exists, the existing definition is replaced. */)
1610 1610
1611 if (n == max_fringe_bitmaps) 1611 if (n == max_fringe_bitmaps)
1612 { 1612 {
1613 if ((max_fringe_bitmaps + 20) > MAX_FRINGE_BITMAPS) 1613 int bitmaps = max_fringe_bitmaps + 20;
1614 if (MAX_FRINGE_BITMAPS < bitmaps)
1614 error ("No free fringe bitmap slots"); 1615 error ("No free fringe bitmap slots");
1615 1616
1616 i = max_fringe_bitmaps; 1617 i = max_fringe_bitmaps;
1617 max_fringe_bitmaps += 20;
1618 fringe_bitmaps 1618 fringe_bitmaps
1619 = ((struct fringe_bitmap **) 1619 = ((struct fringe_bitmap **)
1620 xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof (struct fringe_bitmap *))); 1620 xrealloc (fringe_bitmaps, bitmaps * sizeof *fringe_bitmaps));
1621 fringe_faces 1621 fringe_faces
1622 = (Lisp_Object *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (Lisp_Object)); 1622 = (Lisp_Object *) xrealloc (fringe_faces,
1623 bitmaps * sizeof *fringe_faces);
1623 1624
1624 for (; i < max_fringe_bitmaps; i++) 1625 for (i = max_fringe_bitmaps; i < bitmaps; i++)
1625 { 1626 {
1626 fringe_bitmaps[i] = NULL; 1627 fringe_bitmaps[i] = NULL;
1627 fringe_faces[i] = Qnil; 1628 fringe_faces[i] = Qnil;
1628 } 1629 }
1630
1631 max_fringe_bitmaps = bitmaps;
1629 } 1632 }
1630 } 1633 }
1631 1634
@@ -1784,7 +1787,7 @@ init_fringe_once (void)
1784 int bt; 1787 int bt;
1785 1788
1786 for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++) 1789 for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
1787 init_fringe_bitmap(bt, &standard_bitmaps[bt], 1); 1790 init_fringe_bitmap (bt, &standard_bitmaps[bt], 1);
1788} 1791}
1789 1792
1790void 1793void