[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113889: Fix bug #15090 with redisplay under linum-m
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r113889: Fix bug #15090 with redisplay under linum-mode and visual-line-mode. |
Date: |
Thu, 15 Aug 2013 15:20:32 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113889
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15090
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Thu 2013-08-15 18:20:03 +0300
message:
Fix bug #15090 with redisplay under linum-mode and visual-line-mode.
src/xdisp.c (compute_window_start_on_continuation_line): When
WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
to make sure we end up setting the window start at the leftmost
visible character of the display line. This avoids funky
horizontal shifting because the window start is not kept on the
same position.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-08-15 15:10:12 +0000
+++ b/src/ChangeLog 2013-08-15 15:20:03 +0000
@@ -1,3 +1,12 @@
+2013-08-15 Eli Zaretskii <address@hidden>
+
+ * xdisp.c (compute_window_start_on_continuation_line): When
+ WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
+ to make sure we end up setting the window start at the leftmost
+ visible character of the display line. This avoids funky
+ horizontal shifting because the window start is not kept on the
+ same position. (Bug#15090)
+
2013-08-15 Lars Magne Ingebrigtsen <address@hidden>
* image.c (imagemagick_compute_animated_image): Implement animated
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2013-08-14 07:25:45 +0000
+++ b/src/xdisp.c 2013-08-15 15:20:03 +0000
@@ -14912,7 +14912,25 @@
{
min_distance = distance;
pos = it.current.pos;
- move_it_by_lines (&it, 1);
+ if (it.line_wrap == WORD_WRAP)
+ {
+ /* Under WORD_WRAP, move_it_by_lines is likely to
+ overshoot and stop not at the first, but the
+ second character from the left margin. So in
+ that case, we need a more tight control on the X
+ coordinate of the iterator than move_it_by_lines
+ promises in its contract. The method is to first
+ go to the last (rightmost) visible character of a
+ line, then move to the leftmost character on the
+ next line in a separate call. */
+ move_it_to (&it, ZV, it.last_visible_x, it.current_y, -1,
+ MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
+ move_it_to (&it, ZV, 0,
+ it.current_y + it.max_ascent + it.max_descent, -1,
+ MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
+ }
+ else
+ move_it_by_lines (&it, 1);
}
/* Set the window start there. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113889: Fix bug #15090 with redisplay under linum-mode and visual-line-mode.,
Eli Zaretskii <=