[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106726: Fix assertion violation in p
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106726: Fix assertion violation in pop_it when org-indent-mode is used. |
Date: |
Fri, 23 Dec 2011 16:51:51 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106726
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2011-12-23 16:51:51 +0200
message:
Fix assertion violation in pop_it when org-indent-mode is used.
src/xdisp.c (handle_invisible_prop): Handle correctly an invisible
property that ends at ZV, so that the bidi iteration could be
resumed from there (after widening).
modified:
src/ChangeLog
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-12-22 13:58:40 +0000
+++ b/src/ChangeLog 2011-12-23 14:51:51 +0000
@@ -1,3 +1,9 @@
+2011-12-23 Eli Zaretskii <address@hidden>
+
+ * xdisp.c (handle_invisible_prop): Handle correctly an invisible
+ property that ends at ZV, so that the bidi iteration could be
+ resumed from there (after widening).
+
2011-12-22 Jan Djärv <address@hidden>
* nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2011-12-10 19:54:45 +0000
+++ b/src/xdisp.c 2011-12-23 14:51:51 +0000
@@ -4090,10 +4090,11 @@
while (invis_p);
/* The position newpos is now either ZV or on visible text. */
- if (it->bidi_p && newpos < ZV)
+ if (it->bidi_p)
{
EMACS_INT bpos = CHAR_TO_BYTE (newpos);
- int on_newline = FETCH_BYTE (bpos) == '\n';
+ int on_newline =
+ bpos == ZV_BYTE || FETCH_BYTE (bpos) == '\n';
int after_newline =
newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n';
@@ -4111,16 +4112,16 @@
SET_TEXT_POS (tpos, newpos, bpos);
reseat_1 (it, tpos, 0);
- /* If we reseat on a newline, we need to prep the
+ /* If we reseat on a newline/ZV, we need to prep the
bidi iterator for advancing to the next character
- after the newline, keeping the current paragraph
+ after the newline/EOB, keeping the current paragraph
direction (so that PRODUCE_GLYPHS does TRT wrt
prepending/appending glyphs to a glyph row). */
if (on_newline)
{
it->bidi_it.first_elt = 0;
it->bidi_it.paragraph_dir = pdir;
- it->bidi_it.ch = '\n';
+ it->bidi_it.ch = (bpos == ZV_BYTE) ? -1 : '\n';
it->bidi_it.nchars = 1;
it->bidi_it.ch_len = 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106726: Fix assertion violation in pop_it when org-indent-mode is used.,
Eli Zaretskii <=