aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-07-28 16:09:02 +0300
committerEli Zaretskii2014-07-28 16:09:02 +0300
commit17ee955294f501c5da91d74baa8a8e38210d77eb (patch)
tree4b2cc8550593296f81ef10182cacfc1c91264677 /src
parent1c6c2e3c70ff2f666a1e3f29b8852d375c8392cd (diff)
downloademacs-17ee955294f501c5da91d74baa8a8e38210d77eb.tar.gz
emacs-17ee955294f501c5da91d74baa8a8e38210d77eb.zip
Fix another part of bug #18035 with redisplay of line-prefix and linum-mode.
src/xdisp.c (display_line): If called with iterator set up to write to a marginal area, delay the call to handle_line_prefix until we switch back to the text area.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xdisp.c27
2 files changed, 27 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 619efb479e6..090ed55bf92 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12014-07-28 Eli Zaretskii <eliz@gnu.org> 12014-07-28 Eli Zaretskii <eliz@gnu.org>
2 2
3 * xdisp.c (display_line): If called with iterator set up to write
4 to a marginal area, delay the call to handle_line_prefix until we
5 switch back to the text area. (Bug#18035)
6
3 * .gdbinit (xwindow): The members total_cols, total_lines, 7 * .gdbinit (xwindow): The members total_cols, total_lines,
4 left_col, and top_line are C integers (and has been so for the 8 left_col, and top_line are C integers (and has been so for the
5 last 1.5 years). 9 last 1.5 years).
diff --git a/src/xdisp.c b/src/xdisp.c
index d1016b6b8d7..5cd90136ee6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19942,6 +19942,7 @@ display_line (struct it *it)
19942 int cvpos; 19942 int cvpos;
19943 ptrdiff_t min_pos = ZV + 1, max_pos = 0; 19943 ptrdiff_t min_pos = ZV + 1, max_pos = 0;
19944 ptrdiff_t min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0); 19944 ptrdiff_t min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0);
19945 bool pending_handle_line_prefix = false;
19945 19946
19946 /* We always start displaying at hpos zero even if hscrolled. */ 19947 /* We always start displaying at hpos zero even if hscrolled. */
19947 eassert (it->hpos == 0 && it->current_x == 0); 19948 eassert (it->hpos == 0 && it->current_x == 0);
@@ -20002,13 +20003,23 @@ display_line (struct it *it)
20002 min_pos = CHARPOS (this_line_min_pos); 20003 min_pos = CHARPOS (this_line_min_pos);
20003 min_bpos = BYTEPOS (this_line_min_pos); 20004 min_bpos = BYTEPOS (this_line_min_pos);
20004 } 20005 }
20005 else 20006 else if (it->area == TEXT_AREA)
20006 { 20007 {
20007 /* We only do this when not calling `move_it_in_display_line_to' 20008 /* We only do this when not calling move_it_in_display_line_to
20008 above, because move_it_in_display_line_to calls 20009 above, because that function calls itself handle_line_prefix. */
20009 handle_line_prefix itself. */
20010 handle_line_prefix (it); 20010 handle_line_prefix (it);
20011 } 20011 }
20012 else
20013 {
20014 /* Line-prefix and wrap-prefix are always displayed in the text
20015 area. But if this is the first call to display_line after
20016 init_iterator, the iterator might have been set up to write
20017 into a marginal area, e.g. if the line begins with some
20018 display property that writes to the margins. So we need to
20019 wait with the call to handle_line_prefix until whatever
20020 writes to the margin has done its job. */
20021 pending_handle_line_prefix = true;
20022 }
20012 20023
20013 /* Get the initial row height. This is either the height of the 20024 /* Get the initial row height. This is either the height of the
20014 text hscrolled, if there is any, or zero. */ 20025 text hscrolled, if there is any, or zero. */
@@ -20140,6 +20151,14 @@ display_line (struct it *it)
20140 row->extra_line_spacing = max (row->extra_line_spacing, 20151 row->extra_line_spacing = max (row->extra_line_spacing,
20141 it->max_extra_line_spacing); 20152 it->max_extra_line_spacing);
20142 set_iterator_to_next (it, 1); 20153 set_iterator_to_next (it, 1);
20154 /* If we didn't handle the line/wrap prefix above, and the
20155 call to set_iterator_to_next just switched to TEXT_AREA,
20156 process the prefix now. */
20157 if (it->area == TEXT_AREA && pending_handle_line_prefix)
20158 {
20159 pending_handle_line_prefix = false;
20160 handle_line_prefix (it);
20161 }
20143 continue; 20162 continue;
20144 } 20163 }
20145 20164