summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2011-09-18 22:02:17 +0300
committerEli Zaretskii <eliz@gnu.org>2011-09-18 22:02:17 +0300
commit3e62b7e0044df3960bc6b2b70814c6ca4831d7fb (patch)
tree693a9bc560fb300b275f4d3dd221883080077ca0
parentd473dce83055a56fed39293a0ab5e9023b955862 (diff)
downloademacs-3e62b7e0044df3960bc6b2b70814c6ca4831d7fb.tar.gz
Fix bug #9545 with crash in Dired when $ is pressed.
src/xdisp.c (reseat_at_next_visible_line_start): Undo the change made on 2011-09-17 that saved paragraph information and restored it after the call to `reseat'.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xdisp.c43
2 files changed, 4 insertions, 42 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b81c5cf9792..1e110cc5139 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -8,6 +8,9 @@
(produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
column is beyond frame width: don't subtract 1 "pixel" when
computing width of the stretch.
+ (reseat_at_next_visible_line_start): Undo the change made on
+ 2011-09-17 that saved paragraph information and restored it after
+ the call to `reseat'. (Bug#9545)
2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
diff --git a/src/xdisp.c b/src/xdisp.c
index 97d59644b15..d58eea538f5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5722,10 +5722,6 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
{
int newline_found_p, skipped_p = 0;
struct bidi_it bidi_it_prev;
- int new_paragraph IF_LINT (= 0), first_elt IF_LINT (= 0);
- int disp_prop IF_LINT (= 0);
- EMACS_INT paragraph_end IF_LINT (= 0), disp_pos IF_LINT (= 0);
- bidi_dir_t paragraph_dir IF_LINT (= 0);
newline_found_p = forward_to_next_line_start (it, &skipped_p, &bidi_it_prev);
@@ -5742,23 +5738,6 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
forward_to_next_line_start (it, &skipped_p, &bidi_it_prev);
}
- /* Under bidi iteration, save the attributes of the paragraph we are
- in, to be restored after the call to `reseat' below. That's
- because `reseat' overwrites them, which requires unneeded and
- potentially expensive backward search for paragraph beginning.
- This search is unnecessary because we will be `reseat'ed to the
- same position where we are now, for which we already have all the
- information we need in the bidi iterator. */
- if (it->bidi_p && !STRINGP (it->string))
- {
- new_paragraph = it->bidi_it.new_paragraph;
- first_elt = it->bidi_it.first_elt;
- paragraph_end = it->bidi_it.separator_limit;
- paragraph_dir = it->bidi_it.paragraph_dir;
- disp_pos = it->bidi_it.disp_pos;
- disp_prop = it->bidi_it.disp_prop;
- }
-
/* Position on the newline if that's what's requested. */
if (on_newline_p && newline_found_p)
{
@@ -5798,30 +5777,10 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
IT_BYTEPOS (*it) = it->bidi_it.bytepos;
}
reseat (it, it->current.pos, 0);
- if (it->bidi_p)
- {
- it->bidi_it.new_paragraph = new_paragraph;
- it->bidi_it.first_elt = first_elt;
- it->bidi_it.separator_limit = paragraph_end;
- it->bidi_it.paragraph_dir = paragraph_dir;
- it->bidi_it.disp_pos = disp_pos;
- it->bidi_it.disp_prop = disp_prop;
- }
}
}
else if (skipped_p)
- {
- reseat (it, it->current.pos, 0);
- if (it->bidi_p && !STRINGP (it->string))
- {
- it->bidi_it.new_paragraph = new_paragraph;
- it->bidi_it.first_elt = first_elt;
- it->bidi_it.separator_limit = paragraph_end;
- it->bidi_it.paragraph_dir = paragraph_dir;
- it->bidi_it.disp_pos = disp_pos;
- it->bidi_it.disp_prop = disp_prop;
- }
- }
+ reseat (it, it->current.pos, 0);
CHECK_IT (it);
}