emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104735: Avoid bidi-related crashes i


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104735: Avoid bidi-related crashes in Cperl Mode.
Date: Sun, 26 Jun 2011 20:23:40 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104735
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2011-06-26 20:23:40 +0300
message:
  Avoid bidi-related crashes in Cperl Mode.
  
   src/bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
   bidi_at_paragraph_end, since fast_looking_at doesn't like to be
   called at ZV.
modified:
  src/ChangeLog
  src/bidi.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-06-26 03:40:40 +0000
+++ b/src/ChangeLog     2011-06-26 17:23:40 +0000
@@ -1,3 +1,9 @@
+2011-06-26  Eli Zaretskii  <address@hidden>
+
+       * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
+       bidi_at_paragraph_end, since fast_looking_at doesn't like to be
+       called at ZV.
+
 2011-06-26  Chong Yidong  <address@hidden>
 
        * process.c (wait_reading_process_output): Bypass select if

=== modified file 'src/bidi.c'
--- a/src/bidi.c        2011-06-04 08:04:48 +0000
+++ b/src/bidi.c        2011-06-26 17:23:40 +0000
@@ -744,8 +744,6 @@
                       || type == LRE || type == LRO));
             type = bidi_get_type (ch, NEUTRAL_DIR))
          {
-           if (type == NEUTRAL_B && bidi_at_paragraph_end (pos, bytepos) >= -1)
-             break;
            if (bytepos >= ZV_BYTE)
              {
                /* Pretend there's a paragraph separator at end of
@@ -753,6 +751,8 @@
                type = NEUTRAL_B;
                break;
              }
+           if (type == NEUTRAL_B && bidi_at_paragraph_end (pos, bytepos) >= -1)
+             break;
            /* Fetch next character and advance to get past it.  */
            ch = bidi_fetch_char (bytepos, pos, &disp_pos,
                                  bidi_it->frame_window_p, &ch_len, &nchars);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]