Avoid leaving traces of cursor when entering linum-mode.
src/fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the left fringe if the window has a left margin. This avoids leaving traces of the cursor because its leftmost pixel is not drawn over.
This commit is contained in:
parent
e99579563e
commit
aba05ce9b6
2 changed files with 12 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
2012-09-09 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
|
||||
left fringe if the window has a left margin. This avoids leaving
|
||||
traces of the cursor because its leftmost pixel is not drawn over.
|
||||
|
||||
* dispnew.c (update_window_line): When the left margin area of a
|
||||
screen line is updated, set the redraw_fringe_bitmaps_p flag of
|
||||
that screen line. (Bug#12277)
|
||||
|
|
|
@ -659,7 +659,14 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o
|
|||
{
|
||||
/* If W has a vertical border to its left, don't draw over it. */
|
||||
wd -= ((!WINDOW_LEFTMOST_P (w)
|
||||
&& !WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
|
||||
&& !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
|
||||
/* But don't reduce the fringe width if the window
|
||||
has a left margin, because that means we are not
|
||||
in danger of drawing over the vertical border,
|
||||
and OTOH leaving out that one pixel leaves behind
|
||||
traces of the cursor, if it was in column zero
|
||||
before drawing non-empty margin area. */
|
||||
&& NILP (w->left_margin_cols))
|
||||
? 1 : 0);
|
||||
p.bx = x - wd;
|
||||
p.nx = wd;
|
||||
|
|
Loading…
Add table
Reference in a new issue