aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-03 19:19:39 +0000
committerGerd Moellmann2001-01-03 19:19:39 +0000
commita77dc1ecc3c03a316964177f488597e1c460999d (patch)
tree930c5b4b726c557f67241859b37f954fa03e85b3 /src
parent1bf6b1bf093f40354035f72930f08f3f91f91953 (diff)
downloademacs-a77dc1ecc3c03a316964177f488597e1c460999d.tar.gz
emacs-a77dc1ecc3c03a316964177f488597e1c460999d.zip
(forward_to_next_line_start): Reset it->c if taking the
short cut at the start of the function. Add an assertion. (reseat_at_next_visible_line_start): Add an assertion.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xdisp.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b47b5c69512..d218f86eeb8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12001-01-03 Gerd Moellmann <gerd@gnu.org> 12001-01-03 Gerd Moellmann <gerd@gnu.org>
2 2
3 * xdisp.c (forward_to_next_line_start): Reset it->c if taking the
4 short cut at the start of the function. Add an assertion.
5 (reseat_at_next_visible_line_start): Add an assertion.
6
3 * window.c (Frecenter): When changing the window start, set the 7 * window.c (Frecenter): When changing the window start, set the
4 window's window_end_valid to nil. 8 window's window_end_valid to nil.
5 (Fwindow_end): Fix window-end computation when UPDATE is non-nil. 9 (Fwindow_end): Fix window-end computation when UPDATE is non-nil.
diff --git a/src/xdisp.c b/src/xdisp.c
index 3e9790d1b8e..d4f25661e08 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3494,6 +3494,7 @@ forward_to_next_line_start (it, skipped_p)
3494 if (it->what == IT_CHARACTER && it->c == '\n') 3494 if (it->what == IT_CHARACTER && it->c == '\n')
3495 { 3495 {
3496 set_iterator_to_next (it, 0); 3496 set_iterator_to_next (it, 0);
3497 it->c = 0;
3497 return 1; 3498 return 1;
3498 } 3499 }
3499 3500
@@ -3553,6 +3554,7 @@ forward_to_next_line_start (it, skipped_p)
3553 } 3554 }
3554 3555
3555 it->selective = old_selective; 3556 it->selective = old_selective;
3557 xassert (!newline_found_p || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n');
3556 return newline_found_p; 3558 return newline_found_p;
3557} 3559}
3558 3560
@@ -3642,9 +3644,12 @@ reseat_at_next_visible_line_start (it, on_newline_p)
3642 more than the value of IT->selective. */ 3644 more than the value of IT->selective. */
3643 if (it->selective > 0) 3645 if (it->selective > 0)
3644 while (IT_CHARPOS (*it) < ZV 3646 while (IT_CHARPOS (*it) < ZV
3645 && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), 3647 && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it),
3646 it->selective)) 3648 it->selective))
3647 newline_found_p = forward_to_next_line_start (it, &skipped_p); 3649 {
3650 xassert (FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n');
3651 newline_found_p = forward_to_next_line_start (it, &skipped_p);
3652 }
3648 3653
3649 /* Position on the newline if that's what's requested. */ 3654 /* Position on the newline if that's what's requested. */
3650 if (on_newline_p && newline_found_p) 3655 if (on_newline_p && newline_found_p)