aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c52
1 files changed, 23 insertions, 29 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 4a6bc3ffeb7..4f3c5b1c565 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9643,22 +9643,14 @@ redisplay ()
9643 9643
9644 9644
9645static Lisp_Object 9645static Lisp_Object
9646overlay_arrow_string_or_property (var, pbitmap) 9646overlay_arrow_string_or_property (var)
9647 Lisp_Object var; 9647 Lisp_Object var;
9648 int *pbitmap;
9649{ 9648{
9650 Lisp_Object pstr = Fget (var, Qoverlay_arrow_string); 9649 Lisp_Object val;
9651 Lisp_Object bitmap;
9652 9650
9653 if (pbitmap) 9651 if (val = Fget (var, Qoverlay_arrow_string), STRINGP (val))
9654 { 9652 return val;
9655 *pbitmap = 0;
9656 if (bitmap = Fget (var, Qoverlay_arrow_bitmap), INTEGERP (bitmap))
9657 *pbitmap = XINT (bitmap);
9658 }
9659 9653
9660 if (!NILP (pstr))
9661 return pstr;
9662 return Voverlay_arrow_string; 9654 return Voverlay_arrow_string;
9663} 9655}
9664 9656
@@ -9708,7 +9700,7 @@ overlay_arrows_changed_p ()
9708 continue; 9700 continue;
9709 if (! EQ (COERCE_MARKER (val), 9701 if (! EQ (COERCE_MARKER (val),
9710 Fget (var, Qlast_arrow_position)) 9702 Fget (var, Qlast_arrow_position))
9711 || ! (pstr = overlay_arrow_string_or_property (var, 0), 9703 || ! (pstr = overlay_arrow_string_or_property (var),
9712 EQ (pstr, Fget (var, Qlast_arrow_string)))) 9704 EQ (pstr, Fget (var, Qlast_arrow_string))))
9713 return 1; 9705 return 1;
9714 } 9706 }
@@ -9738,7 +9730,7 @@ update_overlay_arrows (up_to_date)
9738 Fput (var, Qlast_arrow_position, 9730 Fput (var, Qlast_arrow_position,
9739 COERCE_MARKER (val)); 9731 COERCE_MARKER (val));
9740 Fput (var, Qlast_arrow_string, 9732 Fput (var, Qlast_arrow_string,
9741 overlay_arrow_string_or_property (var, 0)); 9733 overlay_arrow_string_or_property (var));
9742 } 9734 }
9743 else if (up_to_date < 0 9735 else if (up_to_date < 0
9744 || !NILP (Fget (var, Qlast_arrow_position))) 9736 || !NILP (Fget (var, Qlast_arrow_position)))
@@ -9751,14 +9743,13 @@ update_overlay_arrows (up_to_date)
9751 9743
9752 9744
9753/* Return overlay arrow string to display at row. 9745/* Return overlay arrow string to display at row.
9754 Return t if display as bitmap in left fringe. 9746 Return integer (bitmap number) for arrow bitmap in left fringe.
9755 Return nil if no overlay arrow. */ 9747 Return nil if no overlay arrow. */
9756 9748
9757static Lisp_Object 9749static Lisp_Object
9758overlay_arrow_at_row (it, row, pbitmap) 9750overlay_arrow_at_row (it, row)
9759 struct it *it; 9751 struct it *it;
9760 struct glyph_row *row; 9752 struct glyph_row *row;
9761 int *pbitmap;
9762{ 9753{
9763 Lisp_Object vlist; 9754 Lisp_Object vlist;
9764 9755
@@ -9778,17 +9769,21 @@ overlay_arrow_at_row (it, row, pbitmap)
9778 && current_buffer == XMARKER (val)->buffer 9769 && current_buffer == XMARKER (val)->buffer
9779 && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) 9770 && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
9780 { 9771 {
9781 val = overlay_arrow_string_or_property (var, pbitmap);
9782 if (FRAME_WINDOW_P (it->f) 9772 if (FRAME_WINDOW_P (it->f)
9783 && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0) 9773 && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0)
9784 return Qt; 9774 {
9785 if (STRINGP (val)) 9775 if (val = Fget (var, Qoverlay_arrow_bitmap), SYMBOLP (val))
9786 return val; 9776 {
9787 break; 9777 int fringe_bitmap;
9778 if ((fringe_bitmap = lookup_fringe_bitmap (val)) != 0)
9779 return make_number (fringe_bitmap);
9780 }
9781 return make_number (-1); /* Use default arrow bitmap */
9782 }
9783 return overlay_arrow_string_or_property (var);
9788 } 9784 }
9789 } 9785 }
9790 9786
9791 *pbitmap = 0;
9792 return Qnil; 9787 return Qnil;
9793} 9788}
9794 9789
@@ -14846,7 +14841,6 @@ display_line (it)
14846 struct it *it; 14841 struct it *it;
14847{ 14842{
14848 struct glyph_row *row = it->glyph_row; 14843 struct glyph_row *row = it->glyph_row;
14849 int overlay_arrow_bitmap;
14850 Lisp_Object overlay_arrow_string; 14844 Lisp_Object overlay_arrow_string;
14851 14845
14852 /* We always start displaying at hpos zero even if hscrolled. */ 14846 /* We always start displaying at hpos zero even if hscrolled. */
@@ -15254,9 +15248,9 @@ display_line (it)
15254 mark this glyph row as the one containing the overlay arrow. 15248 mark this glyph row as the one containing the overlay arrow.
15255 This is clearly a mess with variable size fonts. It would be 15249 This is clearly a mess with variable size fonts. It would be
15256 better to let it be displayed like cursors under X. */ 15250 better to let it be displayed like cursors under X. */
15257 if ((overlay_arrow_string 15251 if ((row->displays_text_p || !overlay_arrow_seen)
15258 = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap), 15252 && (overlay_arrow_string = overlay_arrow_at_row (it, row),
15259 !NILP (overlay_arrow_string))) 15253 !NILP (overlay_arrow_string)))
15260 { 15254 {
15261 /* Overlay arrow in window redisplay is a fringe bitmap. */ 15255 /* Overlay arrow in window redisplay is a fringe bitmap. */
15262 if (STRINGP (overlay_arrow_string)) 15256 if (STRINGP (overlay_arrow_string))
@@ -15286,8 +15280,8 @@ display_line (it)
15286 } 15280 }
15287 else 15281 else
15288 { 15282 {
15289 it->w->overlay_arrow_bitmap = overlay_arrow_bitmap; 15283 xassert (INTEGERP (overlay_arrow_string));
15290 row->overlay_arrow_p = 1; 15284 row->overlay_arrow_bitmap = XINT (overlay_arrow_string);
15291 } 15285 }
15292 overlay_arrow_seen = 1; 15286 overlay_arrow_seen = 1;
15293 } 15287 }