Commit f1601063 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Avoid assertion violations in Rmail due to newline cache

 src/search.c (find_newline): Avoid assertion violations in
 CHAR_TO_BYTE when a portion of the buffer was deleted and we look
 for newlines near the end of the buffer.  This happens in Rmail
 hen JIT font-lock fontifies a newly displayed portion of the
 buffer.
parent 1b0ebbdb
2015-02-28 Eli Zaretskii <eliz@gnu.org>
* search.c (find_newline): Avoid assertion violations in
CHAR_TO_BYTE when a portion of the buffer was deleted and we look
for newlines near the end of the buffer. This happens in Rmail
hen JIT font-lock fontifies a newly displayed portion of the
buffer.
2015-02-23 Eli Zaretskii <eliz@gnu.org>
* w32fns.c (Fw32__menu_bar_in_use): New internal function.
......
......@@ -731,6 +731,12 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
start, &next_change);
if (result)
{
/* When the cache revalidation is deferred,
next-change might point beyond ZV, which will
cause assertion violation in CHAR_TO_BYTE below.
Limit next_change to ZV to avoid that. */
if (next_change > ZV)
next_change = ZV;
start = next_change;
lim1 = next_change = end;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment