diff options
| author | Kim F. Storm | 2004-10-17 13:17:00 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-10-17 13:17:00 +0000 |
| commit | c514efbbf12b7468322df6badaf88b365a4f52ff (patch) | |
| tree | 8898e00bd1d4301beca9961e2b908a47935cd3f2 | |
| parent | 345e75a892a1fa6f0abf0ca4a7ce38ae6bfdde6c (diff) | |
| download | emacs-c514efbbf12b7468322df6badaf88b365a4f52ff.tar.gz emacs-c514efbbf12b7468322df6badaf88b365a4f52ff.zip | |
(overlay_arrow_at_row): Return overlay string rather
than bitmap if there is not left fringe.
(get_overlay_arrow_glyph_row): Also used on windows system.
(display_line): Display overlay string if no left fringe.
| -rw-r--r-- | src/xdisp.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 2f68207a1d1..dbce1c56368 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -9523,11 +9523,13 @@ update_overlay_arrows (up_to_date) | |||
| 9523 | } | 9523 | } |
| 9524 | 9524 | ||
| 9525 | 9525 | ||
| 9526 | /* Return overlay arrow string at row, or nil. */ | 9526 | /* Return overlay arrow string to display at row. |
| 9527 | Return t if display as bitmap in left fringe. | ||
| 9528 | Return nil if no overlay arrow. */ | ||
| 9527 | 9529 | ||
| 9528 | static Lisp_Object | 9530 | static Lisp_Object |
| 9529 | overlay_arrow_at_row (f, row, pbitmap) | 9531 | overlay_arrow_at_row (it, row, pbitmap) |
| 9530 | struct frame *f; | 9532 | struct it *it; |
| 9531 | struct glyph_row *row; | 9533 | struct glyph_row *row; |
| 9532 | int *pbitmap; | 9534 | int *pbitmap; |
| 9533 | { | 9535 | { |
| @@ -9550,9 +9552,10 @@ overlay_arrow_at_row (f, row, pbitmap) | |||
| 9550 | && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) | 9552 | && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) |
| 9551 | { | 9553 | { |
| 9552 | val = overlay_arrow_string_or_property (var, pbitmap); | 9554 | val = overlay_arrow_string_or_property (var, pbitmap); |
| 9553 | if (FRAME_WINDOW_P (f)) | 9555 | if (FRAME_WINDOW_P (it->f) |
| 9556 | && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0) | ||
| 9554 | return Qt; | 9557 | return Qt; |
| 9555 | else if (STRINGP (val)) | 9558 | if (STRINGP (val)) |
| 9556 | return val; | 9559 | return val; |
| 9557 | break; | 9560 | break; |
| 9558 | } | 9561 | } |
| @@ -14073,8 +14076,8 @@ usage: (trace-to-stderr STRING &rest OBJECTS) */) | |||
| 14073 | Building Desired Matrix Rows | 14076 | Building Desired Matrix Rows |
| 14074 | ***********************************************************************/ | 14077 | ***********************************************************************/ |
| 14075 | 14078 | ||
| 14076 | /* Return a temporary glyph row holding the glyphs of an overlay | 14079 | /* Return a temporary glyph row holding the glyphs of an overlay arrow. |
| 14077 | arrow. Only used for non-window-redisplay windows. */ | 14080 | Used for non-window-redisplay windows, and for windows w/o left fringe. */ |
| 14078 | 14081 | ||
| 14079 | static struct glyph_row * | 14082 | static struct glyph_row * |
| 14080 | get_overlay_arrow_glyph_row (w, overlay_arrow_string) | 14083 | get_overlay_arrow_glyph_row (w, overlay_arrow_string) |
| @@ -14955,11 +14958,11 @@ display_line (it) | |||
| 14955 | better to let it be displayed like cursors under X. */ | 14958 | better to let it be displayed like cursors under X. */ |
| 14956 | if (! overlay_arrow_seen | 14959 | if (! overlay_arrow_seen |
| 14957 | && (overlay_arrow_string | 14960 | && (overlay_arrow_string |
| 14958 | = overlay_arrow_at_row (it->f, row, &overlay_arrow_bitmap), | 14961 | = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap), |
| 14959 | !NILP (overlay_arrow_string))) | 14962 | !NILP (overlay_arrow_string))) |
| 14960 | { | 14963 | { |
| 14961 | /* Overlay arrow in window redisplay is a fringe bitmap. */ | 14964 | /* Overlay arrow in window redisplay is a fringe bitmap. */ |
| 14962 | if (!FRAME_WINDOW_P (it->f)) | 14965 | if (STRINGP (overlay_arrow_string)) |
| 14963 | { | 14966 | { |
| 14964 | struct glyph_row *arrow_row | 14967 | struct glyph_row *arrow_row |
| 14965 | = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string); | 14968 | = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string); |
| @@ -14984,10 +14987,12 @@ display_line (it) | |||
| 14984 | row->used[TEXT_AREA] = p2 - row->glyphs[TEXT_AREA]; | 14987 | row->used[TEXT_AREA] = p2 - row->glyphs[TEXT_AREA]; |
| 14985 | } | 14988 | } |
| 14986 | } | 14989 | } |
| 14987 | 14990 | else | |
| 14991 | { | ||
| 14992 | it->w->overlay_arrow_bitmap = overlay_arrow_bitmap; | ||
| 14993 | row->overlay_arrow_p = 1; | ||
| 14994 | } | ||
| 14988 | overlay_arrow_seen = 1; | 14995 | overlay_arrow_seen = 1; |
| 14989 | it->w->overlay_arrow_bitmap = overlay_arrow_bitmap; | ||
| 14990 | row->overlay_arrow_p = 1; | ||
| 14991 | } | 14996 | } |
| 14992 | 14997 | ||
| 14993 | /* Compute pixel dimensions of this line. */ | 14998 | /* Compute pixel dimensions of this line. */ |