[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117363: Fix bug #17969 with vertical-motion thro
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-24 r117363: Fix bug #17969 with vertical-motion through continuation lines with TABs. |
Date: |
Tue, 08 Jul 2014 15:13:58 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117363
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17969
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-07-08 18:12:39 +0300
message:
Fix bug #17969 with vertical-motion through continuation lines with TABs.
src/xdisp.c (move_it_to): Adjust calculation of line_start_x to what
x_produce_glyphs does when it generates a stretch glyph that
represents a TAB.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-07-05 09:53:50 +0000
+++ b/src/ChangeLog 2014-07-08 15:12:39 +0000
@@ -1,3 +1,9 @@
+2014-07-08 Eli Zaretskii <address@hidden>
+
+ * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
+ x_produce_glyphs does when it generates a stretch glyph that
+ represents a TAB. (Bug#17969)
+
2014-07-05 Eli Zaretskii <address@hidden>
* xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2014-07-05 10:24:11 +0000
+++ b/src/xdisp.c 2014-07-08 15:12:39 +0000
@@ -9250,6 +9250,25 @@
{
line_start_x = it->current_x + it->pixel_width
- it->last_visible_x;
+ if (FRAME_WINDOW_P (it->f))
+ {
+ struct face *face = FACE_FROM_ID (it->f, it->face_id);
+ struct font *face_font = face->font;
+
+ /* When display_line produces a continued line
+ that ends in a TAB, it skips a tab stop that
+ is closer than the font's space character
+ width (see x_produce_glyphs where it produces
+ the stretch glyph which represents a TAB).
+ We need to reproduce the same logic here. */
+ eassert (face_font);
+ if (face_font)
+ {
+ if (line_start_x < face_font->space_width)
+ line_start_x
+ += it->tab_width * face_font->space_width;
+ }
+ }
set_iterator_to_next (it, 0);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117363: Fix bug #17969 with vertical-motion through continuation lines with TABs.,
Eli Zaretskii <=