[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4e53d72: Avoid infloop in redisplay with tall image
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 4e53d72: Avoid infloop in redisplay with tall images |
Date: |
Wed, 17 Jun 2015 17:19:24 +0000 |
branch: master
commit 4e53d722ae20544ea3c04ff91052af624ef58175
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid infloop in redisplay with tall images
* src/xdisp.c (try_scrolling): Prevent an infloop when scrolling
down near ZV. (Bug#20808)
Call bidi_unshelve_cache to avoid memory leaks. Use IT_CHARPOS
instead of CHARPOS.
---
src/xdisp.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 7c15330..25eed01 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15094,11 +15094,13 @@ try_scrolling (Lisp_Object window, bool
just_this_one_p,
RESTORE_IT (&it, &it, it1data);
move_it_by_lines (&it, 1);
SAVE_IT (it1, it, it1data);
- } while (line_bottom_y (&it1) - start_y < amount_to_scroll);
+ } while (IT_CHARPOS (it) < ZV
+ && line_bottom_y (&it1) - start_y < amount_to_scroll);
+ bidi_unshelve_cache (it1data, true);
}
/* If STARTP is unchanged, move it down another screen line. */
- if (CHARPOS (it.current.pos) == CHARPOS (startp))
+ if (IT_CHARPOS (it) == CHARPOS (startp))
move_it_by_lines (&it, 1);
startp = it.current.pos;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4e53d72: Avoid infloop in redisplay with tall images,
Eli Zaretskii <=