diff options
Diffstat (limited to 'src/fringe.c')
| -rw-r--r-- | src/fringe.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/src/fringe.c b/src/fringe.c index 1a130f428f3..62de5e5cdb6 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Fringe handling (split from xdisp.c). | 1 | /* Fringe handling (split from xdisp.c). |
| 2 | Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04 | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, |
| 3 | Free Software Foundation, Inc. | 3 | 1998, 1999, 2000, 2000, 2001, 2002, 2003, 2004, |
| 4 | 2005 Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -776,13 +777,14 @@ draw_window_fringes (w, no_fringe) | |||
| 776 | 777 | ||
| 777 | 778 | ||
| 778 | /* Recalculate the bitmaps to show in the fringes of window W. | 779 | /* Recalculate the bitmaps to show in the fringes of window W. |
| 779 | If FORCE_P is 0, only mark rows with modified bitmaps for update in | 780 | Only mark rows with modified bitmaps for update in redraw_fringe_bitmaps_p. |
| 780 | redraw_fringe_bitmaps_p; else mark all rows for update. */ | 781 | |
| 782 | If KEEP_CURRENT_P is 0, update current_matrix too. */ | ||
| 781 | 783 | ||
| 782 | int | 784 | int |
| 783 | update_window_fringes (w, force_p) | 785 | update_window_fringes (w, keep_current_p) |
| 784 | struct window *w; | 786 | struct window *w; |
| 785 | int force_p; | 787 | int keep_current_p; |
| 786 | { | 788 | { |
| 787 | struct glyph_row *row, *cur = 0; | 789 | struct glyph_row *row, *cur = 0; |
| 788 | int yb = window_text_bottom_y (w); | 790 | int yb = window_text_bottom_y (w); |
| @@ -848,7 +850,8 @@ update_window_fringes (w, force_p) | |||
| 848 | { | 850 | { |
| 849 | if (!done_top) | 851 | if (!done_top) |
| 850 | { | 852 | { |
| 851 | if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer))) | 853 | if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)) |
| 854 | && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row)) | ||
| 852 | row->indicate_bob_p = !NILP (boundary_top); | 855 | row->indicate_bob_p = !NILP (boundary_top); |
| 853 | else | 856 | else |
| 854 | row->indicate_top_line_p = !NILP (arrow_top); | 857 | row->indicate_top_line_p = !NILP (arrow_top); |
| @@ -857,7 +860,8 @@ update_window_fringes (w, force_p) | |||
| 857 | 860 | ||
| 858 | if (!done_bot) | 861 | if (!done_bot) |
| 859 | { | 862 | { |
| 860 | if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))) | 863 | if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)) |
| 864 | && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row)) | ||
| 861 | row->indicate_eob_p = !NILP (boundary_bot), done_bot = 1; | 865 | row->indicate_eob_p = !NILP (boundary_bot), done_bot = 1; |
| 862 | else if (y + row->height >= yb) | 866 | else if (y + row->height >= yb) |
| 863 | row->indicate_bottom_line_p = !NILP (arrow_bot), done_bot = 1; | 867 | row->indicate_bottom_line_p = !NILP (arrow_bot), done_bot = 1; |
| @@ -942,8 +946,7 @@ update_window_fringes (w, force_p) | |||
| 942 | else | 946 | else |
| 943 | right = NO_FRINGE_BITMAP; | 947 | right = NO_FRINGE_BITMAP; |
| 944 | 948 | ||
| 945 | if (force_p | 949 | if (row->y != cur->y |
| 946 | || row->y != cur->y | ||
| 947 | || row->visible_height != cur->visible_height | 950 | || row->visible_height != cur->visible_height |
| 948 | || row->ends_at_zv_p != cur->ends_at_zv_p | 951 | || row->ends_at_zv_p != cur->ends_at_zv_p |
| 949 | || left != cur->left_fringe_bitmap | 952 | || left != cur->left_fringe_bitmap |
| @@ -952,11 +955,15 @@ update_window_fringes (w, force_p) | |||
| 952 | || right_face_id != cur->right_fringe_face_id | 955 | || right_face_id != cur->right_fringe_face_id |
| 953 | || cur->redraw_fringe_bitmaps_p) | 956 | || cur->redraw_fringe_bitmaps_p) |
| 954 | { | 957 | { |
| 955 | redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; | 958 | redraw_p = row->redraw_fringe_bitmaps_p = 1; |
| 956 | cur->left_fringe_bitmap = left; | 959 | if (!keep_current_p) |
| 957 | cur->right_fringe_bitmap = right; | 960 | { |
| 958 | cur->left_fringe_face_id = left_face_id; | 961 | cur->redraw_fringe_bitmaps_p = 1; |
| 959 | cur->right_fringe_face_id = right_face_id; | 962 | cur->left_fringe_bitmap = left; |
| 963 | cur->right_fringe_bitmap = right; | ||
| 964 | cur->left_fringe_face_id = left_face_id; | ||
| 965 | cur->right_fringe_face_id = right_face_id; | ||
| 966 | } | ||
| 960 | } | 967 | } |
| 961 | 968 | ||
| 962 | if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap) | 969 | if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap) |
| @@ -974,7 +981,7 @@ update_window_fringes (w, force_p) | |||
| 974 | row[-1].redraw_fringe_bitmaps_p = cur[-1].redraw_fringe_bitmaps_p = 1; | 981 | row[-1].redraw_fringe_bitmaps_p = cur[-1].redraw_fringe_bitmaps_p = 1; |
| 975 | } | 982 | } |
| 976 | 983 | ||
| 977 | return redraw_p; | 984 | return redraw_p && !keep_current_p; |
| 978 | } | 985 | } |
| 979 | 986 | ||
| 980 | 987 | ||