aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2010-05-15 17:43:55 +0300
committerEli Zaretskii2010-05-15 17:43:55 +0300
commit2e9abc3d5340f07c181d3cbeba5d92d36dea5a34 (patch)
treeab74be42860160c21d0a1e15dc95742ed29d7b80
parent7107842975be5da82d085fd97a7bddbbf16b30f9 (diff)
downloademacs-2e9abc3d5340f07c181d3cbeba5d92d36dea5a34.tar.gz
emacs-2e9abc3d5340f07c181d3cbeba5d92d36dea5a34.zip
Avoid crashes when stepping with right-arrow through "^L^L".
bidi.c (bidi_paragraph_init): Remove redundant assertion that we are at the beginning of a line after call to bidi_find_paragraph_start.
-rw-r--r--src/ChangeLog2
-rw-r--r--src/bidi.c5
2 files changed, 2 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 32413ae11c3..30bd78e208c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,6 +2,8 @@
2 2
3 * bidi.c (bidi_paragraph_init): Don't leave alone garbage values 3 * bidi.c (bidi_paragraph_init): Don't leave alone garbage values
4 of bidi_it->paragraph_dir. Call bidi_initialize if needed. 4 of bidi_it->paragraph_dir. Call bidi_initialize if needed.
5 (bidi_paragraph_init): Remove redundant assertion that we are at
6 the beginning of a line after call to bidi_find_paragraph_start.
5 7
6 * xdisp.c (Fcurrent_bidi_paragraph_direction): New function. 8 * xdisp.c (Fcurrent_bidi_paragraph_direction): New function.
7 (syms_of_xdisp): Defsubr it. 9 (syms_of_xdisp): Defsubr it.
diff --git a/src/bidi.c b/src/bidi.c
index 6939e51159f..dbc95608fea 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -916,11 +916,6 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it)
916 middle of it. Find where this paragraph starts. */ 916 middle of it. Find where this paragraph starts. */
917 bytepos = bidi_find_paragraph_start (pos, bytepos); 917 bytepos = bidi_find_paragraph_start (pos, bytepos);
918 918
919 /* We should always be at the beginning of a new line at this
920 point. */
921 if (!(bytepos == BEGV_BYTE || FETCH_CHAR (bytepos - 1) == '\n'))
922 abort ();
923
924 bidi_it->separator_limit = -1; 919 bidi_it->separator_limit = -1;
925 bidi_it->new_paragraph = 0; 920 bidi_it->new_paragraph = 0;
926 ch = FETCH_CHAR (bytepos); 921 ch = FETCH_CHAR (bytepos);