summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2009-08-29 17:36:30 +0000
committerEli Zaretskii <eliz@gnu.org>2009-08-29 17:36:30 +0000
commite0840eefe151fcecd119f24665f7a7445d19892c (patch)
treee4801c2a89bbb6fb4ff3700140bb3746dcfceabb
parent53be4cdb51ae1a8c3f01f25b798acc29fba86dd8 (diff)
downloademacs-e0840eefe151fcecd119f24665f7a7445d19892c.tar.gz
(redisplay_internal): Remove redundant test and collapse both branches
into one.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c34
2 files changed, 16 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a5c20814b3f..171319d59f8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-29 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (redisplay_internal): Remove redundant test and collapse
+ both branches into one.
+
2009-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs.c (USAGE1): Remove --(no-)multibyte, --(no-)unibyte.
diff --git a/src/xdisp.c b/src/xdisp.c
index a13463555d6..52c4037bbb2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -11658,29 +11658,17 @@ redisplay_internal (preserve_echo_area)
= MATRIX_ROW (w->current_matrix, this_line_vpos + 1);
int delta, delta_bytes;
- if (Z - CHARPOS (tlendpos) == ZV)
- {
- /* This line ends at end of (accessible part of)
- buffer. There is no newline to count. */
- delta = (Z
- - CHARPOS (tlendpos)
- - MATRIX_ROW_START_CHARPOS (row));
- delta_bytes = (Z_BYTE
- - BYTEPOS (tlendpos)
- - MATRIX_ROW_START_BYTEPOS (row));
- }
- else
- {
- /* This line ends in a newline. Must take
- account of the newline and the rest of the
- text that follows. */
- delta = (Z
- - CHARPOS (tlendpos)
- - MATRIX_ROW_START_CHARPOS (row));
- delta_bytes = (Z_BYTE
- - BYTEPOS (tlendpos)
- - MATRIX_ROW_START_BYTEPOS (row));
- }
+ /* We used to distinguish between two cases here,
+ conditioned by Z - CHARPOS (tlendpos) == ZV, for
+ when the line ends in a newline or the end of the
+ buffer's accessible portion. But both cases did
+ the same, so they were collapsed. */
+ delta = (Z
+ - CHARPOS (tlendpos)
+ - MATRIX_ROW_START_CHARPOS (row));
+ delta_bytes = (Z_BYTE
+ - BYTEPOS (tlendpos)
+ - MATRIX_ROW_START_BYTEPOS (row));
increment_matrix_positions (w->current_matrix,
this_line_vpos + 1,