aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-06-17 20:18:11 +0300
committerEli Zaretskii2015-06-17 20:18:11 +0300
commit4e53d722ae20544ea3c04ff91052af624ef58175 (patch)
treefc39efe5c7479e16d6adac7a38045ce6196a7354
parentd6dd70b064898424d322e9717702d490a3e28247 (diff)
downloademacs-4e53d722ae20544ea3c04ff91052af624ef58175.tar.gz
emacs-4e53d722ae20544ea3c04ff91052af624ef58175.zip
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.
-rw-r--r--src/xdisp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 7c153302803..25eed01ecfc 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15094,11 +15094,13 @@ try_scrolling (Lisp_Object window, bool just_this_one_p,
15094 RESTORE_IT (&it, &it, it1data); 15094 RESTORE_IT (&it, &it, it1data);
15095 move_it_by_lines (&it, 1); 15095 move_it_by_lines (&it, 1);
15096 SAVE_IT (it1, it, it1data); 15096 SAVE_IT (it1, it, it1data);
15097 } while (line_bottom_y (&it1) - start_y < amount_to_scroll); 15097 } while (IT_CHARPOS (it) < ZV
15098 && line_bottom_y (&it1) - start_y < amount_to_scroll);
15099 bidi_unshelve_cache (it1data, true);
15098 } 15100 }
15099 15101
15100 /* If STARTP is unchanged, move it down another screen line. */ 15102 /* If STARTP is unchanged, move it down another screen line. */
15101 if (CHARPOS (it.current.pos) == CHARPOS (startp)) 15103 if (IT_CHARPOS (it) == CHARPOS (startp))
15102 move_it_by_lines (&it, 1); 15104 move_it_by_lines (&it, 1);
15103 startp = it.current.pos; 15105 startp = it.current.pos;
15104 } 15106 }