[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 d2db5dd: Fix bug with handling the bidi cache
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 d2db5dd: Fix bug with handling the bidi cache |
Date: |
Thu, 11 Aug 2016 15:12:17 +0000 (UTC) |
branch: emacs-25
commit d2db5dd8358f132252c8d11d40b1457615c43a57
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix bug with handling the bidi cache
* src/xdisp.c (redisplay_window): Save and restore the state of
the bidi cache before reusing the iterator after calls to
try_window and try_window_reusing_current_matrix.
---
src/xdisp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/xdisp.c b/src/xdisp.c
index cc2c951..24daa0c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -16122,6 +16122,7 @@ redisplay_window (Lisp_Object window, bool
just_this_one_p)
bool last_line_misfit = false;
ptrdiff_t beg_unchanged, end_unchanged;
int frame_line_height;
+ void *itdata = NULL;
SET_TEXT_POS (lpoint, PT, PT_BYTE);
opoint = lpoint;
@@ -16843,6 +16844,11 @@ redisplay_window (Lisp_Object window, bool
just_this_one_p)
/* Run scroll hooks. */
startp = run_window_scroll_functions (window, it.current.pos);
+ /* We invoke try_window and try_window_reusing_current_matrix below,
+ and they manipulate the bidi cache. Save and restore the cache
+ state of our iterator, so we could continue using it after that. */
+ itdata = bidi_shelve_cache ();
+
/* Redisplay the window. */
bool use_desired_matrix = false;
if (!current_matrix_up_to_date_p
@@ -16857,6 +16863,8 @@ redisplay_window (Lisp_Object window, bool
just_this_one_p)
= try_window_reusing_current_matrix (w)))
use_desired_matrix = (try_window (window, startp, 0) == 1);
+ bidi_unshelve_cache (itdata, false);
+
/* If new fonts have been loaded (due to fontsets), give up. We
have to start a new redisplay since we need to re-adjust glyph
matrices. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 d2db5dd: Fix bug with handling the bidi cache,
Eli Zaretskii <=