diff options
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index f2700bd6d25..307331627f5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1275,6 +1275,11 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y, } SET_TEXT_POS_FROM_MARKER (top, w->start); + /* Scrolling a minibuffer window via scroll bar when the echo area + shows long text sometimes resets the minibuffer contents behind + our backs. */ + if (CHARPOS (top) > ZV) + SET_TEXT_POS (top, BEGV, BEGV_BYTE); /* Compute exact mode line heights. */ if (WINDOW_WANTS_MODELINE_P (w)) |