diff options
| author | Eli Zaretskii | 2012-09-09 23:10:36 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-09-09 23:10:36 +0300 |
| commit | aba05ce9b6381e3538cfc22dbce7dd7df4ad7342 (patch) | |
| tree | 4b1e7951aa0fdf74e70b470f3e4841d8a3b31a26 /src | |
| parent | e99579563e157a993cef09ee61ea3d0027358f1a (diff) | |
| download | emacs-aba05ce9b6381e3538cfc22dbce7dd7df4ad7342.tar.gz emacs-aba05ce9b6381e3538cfc22dbce7dd7df4ad7342.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/fringe.c | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e336e3dfe89..2537cd77fdc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2012-09-09 Eli Zaretskii <eliz@gnu.org> | 1 | 2012-09-09 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the | ||
| 4 | left fringe if the window has a left margin. This avoids leaving | ||
| 5 | traces of the cursor because its leftmost pixel is not drawn over. | ||
| 6 | |||
| 3 | * dispnew.c (update_window_line): When the left margin area of a | 7 | * dispnew.c (update_window_line): When the left margin area of a |
| 4 | screen line is updated, set the redraw_fringe_bitmaps_p flag of | 8 | screen line is updated, set the redraw_fringe_bitmaps_p flag of |
| 5 | that screen line. (Bug#12277) | 9 | that screen line. (Bug#12277) |
diff --git a/src/fringe.c b/src/fringe.c index 97d03a2bfae..0c2109a0f8e 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -659,7 +659,14 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 659 | { | 659 | { |
| 660 | /* If W has a vertical border to its left, don't draw over it. */ | 660 | /* If W has a vertical border to its left, don't draw over it. */ |
| 661 | wd -= ((!WINDOW_LEFTMOST_P (w) | 661 | wd -= ((!WINDOW_LEFTMOST_P (w) |
| 662 | && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) | 662 | && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) |
| 663 | /* But don't reduce the fringe width if the window | ||
| 664 | has a left margin, because that means we are not | ||
| 665 | in danger of drawing over the vertical border, | ||
| 666 | and OTOH leaving out that one pixel leaves behind | ||
| 667 | traces of the cursor, if it was in column zero | ||
| 668 | before drawing non-empty margin area. */ | ||
| 669 | && NILP (w->left_margin_cols)) | ||
| 663 | ? 1 : 0); | 670 | ? 1 : 0); |
| 664 | p.bx = x - wd; | 671 | p.bx = x - wd; |
| 665 | p.nx = wd; | 672 | p.nx = wd; |