aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-05-22 15:38:26 +0300
committerEli Zaretskii2010-05-22 15:38:26 +0300
commit53b77dc4fbc1007ac38f4cdd7831d5fe643340dd (patch)
treedd0c2b059ec63cf5475da58f7cd04d42505487d8 /src
parent0416466c4d8c8cc3011f81cd488ba4f629e70288 (diff)
downloademacs-53b77dc4fbc1007ac38f4cdd7831d5fe643340dd.tar.gz
emacs-53b77dc4fbc1007ac38f4cdd7831d5fe643340dd.zip
Test and debug find_row_edges on TTY display.
xdisp.c (find_row_edges): Handle the case of characters delivered from display vector. Fix tests related to it->method.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c20
2 files changed, 19 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1947f9598f0..d4c072b1fab 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12010-05-22 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (find_row_edges): Handle the case of characters
4 delivered from display vector. Fix tests related to it->method.
5
12010-05-19 Eli Zaretskii <eliz@gnu.org> 62010-05-19 Eli Zaretskii <eliz@gnu.org>
2 7
3 * .gdbinit (prowlims): Display row->minpos and row->maxpos. 8 * .gdbinit (prowlims): Display row->minpos and row->maxpos.
diff --git a/src/xdisp.c b/src/xdisp.c
index 47c08d0df79..47c4945c9dc 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17538,7 +17538,9 @@ find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos)
17538 Line is continued from buffer max_pos + 1 17538 Line is continued from buffer max_pos + 1
17539 Line ends in a newline from string max_pos 17539 Line ends in a newline from string max_pos
17540 Line is continued from string max_pos 17540 Line is continued from string max_pos
17541 Line is continued from display vector max_pos
17541 Line is entirely from a string min_pos == max_pos 17542 Line is entirely from a string min_pos == max_pos
17543 Line is entirely from a display vector min_pos == max_pos
17542 Line that ends at ZV ZV 17544 Line that ends at ZV ZV
17543 17545
17544 If you discover other use-cases, please add them here as 17546 If you discover other use-cases, please add them here as
@@ -17547,21 +17549,27 @@ find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos)
17547 row->maxpos = it->current.pos; 17549 row->maxpos = it->current.pos;
17548 else if (row->used[TEXT_AREA]) 17550 else if (row->used[TEXT_AREA])
17549 { 17551 {
17550 if (CHARPOS (it->eol_pos) > 0) 17552 if (row->ends_in_newline_from_string_p)
17553 SET_TEXT_POS (row->maxpos, max_pos, max_bpos);
17554 else if (CHARPOS (it->eol_pos) > 0)
17551 SET_TEXT_POS (row->maxpos, 17555 SET_TEXT_POS (row->maxpos,
17552 CHARPOS (it->eol_pos) + 1, BYTEPOS (it->eol_pos) + 1); 17556 CHARPOS (it->eol_pos) + 1, BYTEPOS (it->eol_pos) + 1);
17553 else if (row->continued_p) 17557 else if (row->continued_p)
17554 { 17558 {
17555 if (it->method == GET_FROM_BUFFER) 17559 /* If max_pos is different from IT's current position, it
17560 means IT->method does not belong to the display element
17561 at max_pos. However, it also means that the display
17562 element at max_pos was displayed in its entirety on this
17563 line, which is equivalent to saying that the next line
17564 starts at the next buffer position. */
17565 if (IT_CHARPOS (*it) == max_pos && it->method != GET_FROM_BUFFER)
17566 SET_TEXT_POS (row->maxpos, max_pos, max_bpos);
17567 else
17556 { 17568 {
17557 INC_BOTH (max_pos, max_bpos); 17569 INC_BOTH (max_pos, max_bpos);
17558 SET_TEXT_POS (row->maxpos, max_pos, max_bpos); 17570 SET_TEXT_POS (row->maxpos, max_pos, max_bpos);
17559 } 17571 }
17560 else
17561 SET_TEXT_POS (row->maxpos, max_pos, max_bpos);
17562 } 17572 }
17563 else if (row->ends_in_newline_from_string_p)
17564 SET_TEXT_POS (row->maxpos, max_pos, max_bpos);
17565 else if (max_pos == min_pos && it->method != GET_FROM_BUFFER) 17573 else if (max_pos == min_pos && it->method != GET_FROM_BUFFER)
17566 /* A line that is entirely from a string/image/stretch... */ 17574 /* A line that is entirely from a string/image/stretch... */
17567 row->maxpos = row->minpos; 17575 row->maxpos = row->minpos;