diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 16 | ||||
-rw-r--r-- | src/textprop.c | 4 | ||||
-rw-r--r-- | src/w32term.c | 52 | ||||
-rw-r--r-- | src/xterm.c | 54 |
4 files changed, 98 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f7010859ba..d8895a91a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2011-05-12 Drew Adams <[email protected]> + + * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655). + +2011-05-12 YAMAMOTO Mitsuharu <[email protected]> + + * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and + `width' to `bar_area_x' and `bar_area_width', respectively. + (x_scroll_run): Take account of fringe background extension. + + * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]: Rename + local vars `left' and `width' to `bar_area_x' and + `bar_area_width', respectively. + (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe + background extension. + 2011-05-10 Juanma Barranquero <[email protected]> * image.c (Finit_image_library): Return t for built-in image types, diff --git a/src/textprop.c b/src/textprop.c index aad090c5b4..566b2962a6 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -838,8 +838,8 @@ In a buffer, it runs to (point-min), and the value cannot be less than that. The property values are compared with `eq'. If the property is constant all the way to the start of OBJECT, return the first valid position in OBJECT. -If the optional fourth argument LIMIT is non-nil, don't search -back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) +If the optional fourth argument LIMIT is non-nil, don't search back past +position LIMIT; return LIMIT if nothing is found before reaching LIMIT. */) (Lisp_Object position, Lisp_Object prop, Lisp_Object object, Lisp_Object limit) { if (STRINGP (object)) diff --git a/src/w32term.c b/src/w32term.c index f6a6ba3e82..d22aee6dc7 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -715,22 +715,22 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, if (sb_width > 0) { - int left = WINDOW_SCROLL_BAR_AREA_X (w); - int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) - * FRAME_COLUMN_WIDTH (f)); + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); if (bx < 0) { /* Bitmap fills the fringe. */ - if (left + width == p->x) - bx = left + sb_width; - else if (p->x + p->wd == left) - bx = left; + if (bar_area_x + bar_area_width == p->x) + bx = bar_area_x + sb_width; + else if (p->x + p->wd == bar_area_x) + bx = bar_area_x; if (bx >= 0) { int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); - nx = width - sb_width; + nx = bar_area_width - sb_width; by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); ny = row->visible_height; @@ -738,13 +738,13 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, } else { - if (left + width == bx) + if (bar_area_x + bar_area_width == bx) { - bx = left + sb_width; - nx += width - sb_width; + bx = bar_area_x + sb_width; + nx += bar_area_width - sb_width; } - else if (bx + nx == left) - nx += width - sb_width; + else if (bx + nx == bar_area_x) + nx += bar_area_width - sb_width; } } } @@ -2619,6 +2619,32 @@ x_scroll_run (struct window *w, struct run *run) fringes of W. */ window_box (w, -1, &x, &y, &width, &height); + /* If the fringe is adjacent to the left (right) scroll bar of a + leftmost (rightmost, respectively) window, then extend its + background to the gap between the fringe and the bar. */ + if ((WINDOW_LEFTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) + || (WINDOW_RIGHTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))) + { + int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w); + + if (sb_width > 0) + { + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); + + if (bar_area_x + bar_area_width == x) + { + x = bar_area_x + sb_width; + width += bar_area_width - sb_width; + } + else if (x + width == bar_area_x) + width += bar_area_width - sb_width; + } + } + from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); bottom_y = y + height; diff --git a/src/xterm.c b/src/xterm.c index 20259b7ab2..2352f51cfb 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -753,22 +753,22 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring if (sb_width > 0) { - int left = WINDOW_SCROLL_BAR_AREA_X (w); - int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) - * FRAME_COLUMN_WIDTH (f)); + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); if (bx < 0) { /* Bitmap fills the fringe. */ - if (left + width == p->x) - bx = left + sb_width; - else if (p->x + p->wd == left) - bx = left; + if (bar_area_x + bar_area_width == p->x) + bx = bar_area_x + sb_width; + else if (p->x + p->wd == bar_area_x) + bx = bar_area_x; if (bx >= 0) { int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); - nx = width - sb_width; + nx = bar_area_width - sb_width; by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); ny = row->visible_height; @@ -776,13 +776,13 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring } else { - if (left + width == bx) + if (bar_area_x + bar_area_width == bx) { - bx = left + sb_width; - nx += width - sb_width; + bx = bar_area_x + sb_width; + nx += bar_area_width - sb_width; } - else if (bx + nx == left) - nx += width - sb_width; + else if (bx + nx == bar_area_x) + nx += bar_area_width - sb_width; } } } @@ -3232,6 +3232,34 @@ x_scroll_run (struct window *w, struct run *run) fringe of W. */ window_box (w, -1, &x, &y, &width, &height); +#ifdef USE_TOOLKIT_SCROLL_BARS + /* If the fringe is adjacent to the left (right) scroll bar of a + leftmost (rightmost, respectively) window, then extend its + background to the gap between the fringe and the bar. */ + if ((WINDOW_LEFTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) + || (WINDOW_RIGHTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))) + { + int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w); + + if (sb_width > 0) + { + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); + + if (bar_area_x + bar_area_width == x) + { + x = bar_area_x + sb_width; + width += bar_area_width - sb_width; + } + else if (x + width == bar_area_x) + width += bar_area_width - sb_width; + } + } +#endif + from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); bottom_y = y + height; |