summaryrefslogtreecommitdiff
path: root/src/indent.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2011-08-05 14:04:44 +0300
committerEli Zaretskii <eliz@gnu.org>2011-08-05 14:04:44 +0300
commite61d349dc5d1e9a5f1150445b595965868a865f6 (patch)
tree8cdfa1764af62ea75944ae7849ae46cb8edad5a3 /src/indent.c
parent88f3ed61bb019ef0be696b1ce6d8b17ed0e8f8ff (diff)
parentd736a7c36fca2e768e0cbea832dc6a06ce7a6485 (diff)
downloademacs-e61d349dc5d1e9a5f1150445b595965868a865f6.tar.gz
Fix bug #9221 with memory leak in bidi display.
Add code to monitor memory allocation for bidi cache shelving. src/xdisp.c (display_line): Release buffer allocated for shelved bidi cache. src/bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total amount allocated this far in `bidi_cache_total_alloc'. (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if non-zero, only free the data buffer without restoring the cache contents. All callers changed. src/dispextern.h (bidi_unshelve_cache): Update prototype. src/xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to) (move_it_in_display_line, move_it_to) (move_it_vertically_backward, move_it_by_lines): Replace the call to xfree to an equivalent call to bidi_unshelve_cache. (move_it_in_display_line_to): Fix logic of returning MOVE_POS_MATCH_OR_ZV in the bidi case.
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/indent.c b/src/indent.c
index aaeaaf591ef..70689311dd5 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2135,7 +2135,7 @@ whether or not it is currently displayed in some window. */)
}
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
- bidi_unshelve_cache (itdata);
+ bidi_unshelve_cache (itdata, 0);
}
if (BUFFERP (old_buffer))