/* Fringe handling (split from xdisp.c).
- Copyright (C) 1985-1988, 1993-1995, 1997-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Logical bitmaps are used internally to denote things like
'end-of-buffer', 'left-truncation', 'overlay-arrow', etc.
- Physical bitmaps specify the visual appearence of the bitmap,
+ Physical bitmaps specify the visual appearance of the bitmap,
e.g. 'bottom-left-angle', 'left-arrow', 'left-triangle', etc.
User defined bitmaps are physical bitmaps.
int
lookup_fringe_bitmap (Lisp_Object bitmap)
{
- int bn;
+ EMACS_INT bn;
bitmap = Fget (bitmap, Qfringe);
if (!INTEGERP (bitmap))
get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, int partial_p)
{
Lisp_Object cmap, bm1 = Qnil, bm2 = Qnil, bm;
- int ln1 = 0, ln2 = 0;
+ EMACS_INT ln1 = 0, ln2 = 0;
int ix1 = right_p;
int ix2 = ix1 + (partial_p ? 2 : 0);
int top_ind_rn, bot_ind_rn;
int top_ind_min_y, bot_ind_max_y;
- /* top_ind_rn is set to a nonnegative value whenver
+ /* top_ind_rn is set to a nonnegative value whenever
row->indicate_bob_p is set, so it's OK that top_row_ends_at_zv_p
is not initialized here. Similarly for bot_ind_rn,
row->indicate_eob_p and bot_row_ends_at_zv_p. */
else
{
CHECK_NUMBER (height);
- fb.height = min (XINT (height), 255);
+ fb.height = max (0, min (XINT (height), 255));
if (fb.height > h)
{
fill1 = (fb.height - h) / 2;
else
{
CHECK_NUMBER (width);
- fb.width = min (XINT (width), 255);
+ fb.width = max (0, min (XINT (width), 255));
}
fb.period = 0;
{
struct window *w;
struct glyph_row *row;
- int textpos;
+ ptrdiff_t textpos;
if (NILP (window))
window = selected_window;
if (!NILP (pos))
{
CHECK_NUMBER_COERCE_MARKER (pos);
+ if (! (BEGV <= XINT (pos) && XINT (pos) <= ZV))
+ args_out_of_range (window, pos);
textpos = XINT (pos);
}
else if (w == XWINDOW (selected_window))
defsubr (&Sset_fringe_bitmap_face);
DEFVAR_LISP ("overflow-newline-into-fringe", Voverflow_newline_into_fringe,
- doc: /* *Non-nil means that newline may flow into the right fringe.
+ doc: /* Non-nil means that newline may flow into the right fringe.
This means that display lines which are exactly as wide as the window
(not counting the final newline) will only occupy one screen line, by
showing (or hiding) the final newline in the right fringe; when point