aboutsummaryrefslogtreecommitdiffstats
path: root/src/fringe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fringe.c')
-rw-r--r--src/fringe.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/fringe.c b/src/fringe.c
index a126292e1ff..f728cd6d5ff 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1,5 +1,6 @@
1/* Fringe handling (split from xdisp.c). 1/* Fringe handling (split from xdisp.c).
2 Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc. 2 Copyright (C) 1985-1988, 1993-1995, 1997-2013 Free Software
3 Foundation, Inc.
3 4
4This file is part of GNU Emacs. 5This file is part of GNU Emacs.
5 6
@@ -698,7 +699,7 @@ get_logical_cursor_bitmap (struct window *w, Lisp_Object cursor)
698{ 699{
699 Lisp_Object cmap, bm = Qnil; 700 Lisp_Object cmap, bm = Qnil;
700 701
701 if ((cmap = BVAR (XBUFFER (w->buffer), fringe_cursor_alist)), !NILP (cmap)) 702 if ((cmap = BVAR (XBUFFER (w->contents), fringe_cursor_alist)), !NILP (cmap))
702 { 703 {
703 bm = Fassq (cursor, cmap); 704 bm = Fassq (cursor, cmap);
704 if (CONSP (bm)) 705 if (CONSP (bm))
@@ -735,7 +736,7 @@ get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, in
735 If partial, lookup partial bitmap in default value if not found here. 736 If partial, lookup partial bitmap in default value if not found here.
736 If not partial, or no partial spec is present, use non-partial bitmap. */ 737 If not partial, or no partial spec is present, use non-partial bitmap. */
737 738
738 if ((cmap = BVAR (XBUFFER (w->buffer), fringe_indicator_alist)), !NILP (cmap)) 739 if ((cmap = BVAR (XBUFFER (w->contents), fringe_indicator_alist)), !NILP (cmap))
739 { 740 {
740 bm1 = Fassq (bitmap, cmap); 741 bm1 = Fassq (bitmap, cmap);
741 if (CONSP (bm1)) 742 if (CONSP (bm1))
@@ -962,7 +963,7 @@ update_window_fringes (struct window *w, int keep_current_p)
962 return 0; 963 return 0;
963 964
964 if (!MINI_WINDOW_P (w) 965 if (!MINI_WINDOW_P (w)
965 && (ind = BVAR (XBUFFER (w->buffer), indicate_buffer_boundaries), !NILP (ind))) 966 && (ind = BVAR (XBUFFER (w->contents), indicate_buffer_boundaries), !NILP (ind)))
966 { 967 {
967 if (EQ (ind, Qleft) || EQ (ind, Qright)) 968 if (EQ (ind, Qleft) || EQ (ind, Qright))
968 boundary_top = boundary_bot = arrow_top = arrow_bot = ind; 969 boundary_top = boundary_bot = arrow_top = arrow_bot = ind;
@@ -1003,7 +1004,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1003 { 1004 {
1004 if (top_ind_rn < 0 && row->visible_height > 0) 1005 if (top_ind_rn < 0 && row->visible_height > 0)
1005 { 1006 {
1006 if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)) 1007 if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->contents))
1007 && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row)) 1008 && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row))
1008 row->indicate_bob_p = !NILP (boundary_top); 1009 row->indicate_bob_p = !NILP (boundary_top);
1009 else 1010 else
@@ -1013,7 +1014,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1013 1014
1014 if (bot_ind_rn < 0) 1015 if (bot_ind_rn < 0)
1015 { 1016 {
1016 if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)) 1017 if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->contents))
1017 && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row)) 1018 && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row))
1018 row->indicate_eob_p = !NILP (boundary_bot), bot_ind_rn = rn; 1019 row->indicate_eob_p = !NILP (boundary_bot), bot_ind_rn = rn;
1019 else if (y + row->height >= yb) 1020 else if (y + row->height >= yb)
@@ -1023,7 +1024,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1023 } 1024 }
1024 } 1025 }
1025 1026
1026 empty_pos = BVAR (XBUFFER (w->buffer), indicate_empty_lines); 1027 empty_pos = BVAR (XBUFFER (w->contents), indicate_empty_lines);
1027 if (!NILP (empty_pos) && !EQ (empty_pos, Qright)) 1028 if (!NILP (empty_pos) && !EQ (empty_pos, Qright))
1028 empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft; 1029 empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft;
1029 1030
@@ -1360,8 +1361,8 @@ compute_fringe_widths (struct frame *f, int redraw)
1360 1361
1361 if (left_fringe_width || right_fringe_width) 1362 if (left_fringe_width || right_fringe_width)
1362 { 1363 {
1363 int left_wid = left_fringe_width >= 0 ? left_fringe_width : -left_fringe_width; 1364 int left_wid = eabs (left_fringe_width);
1364 int right_wid = right_fringe_width >= 0 ? right_fringe_width : -right_fringe_width; 1365 int right_wid = eabs (right_fringe_width);
1365 int conf_wid = left_wid + right_wid; 1366 int conf_wid = left_wid + right_wid;
1366 int font_wid = FRAME_COLUMN_WIDTH (f); 1367 int font_wid = FRAME_COLUMN_WIDTH (f);
1367 int cols = (left_wid + right_wid + font_wid-1) / font_wid; 1368 int cols = (left_wid + right_wid + font_wid-1) / font_wid;
@@ -1744,7 +1745,7 @@ Return nil if POS is not visible in WINDOW. */)
1744 else if (w == XWINDOW (selected_window)) 1745 else if (w == XWINDOW (selected_window))
1745 textpos = PT; 1746 textpos = PT;
1746 else 1747 else
1747 textpos = XMARKER (w->pointm)->charpos; 1748 textpos = marker_position (w->pointm);
1748 1749
1749 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); 1750 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
1750 row = row_containing_pos (w, textpos, row, NULL, 0); 1751 row = row_containing_pos (w, textpos, row, NULL, 0);