From: Eli Zaretskii Date: Tue, 22 Sep 2020 13:52:18 +0000 (+0300) Subject: Fix cursor display in mini-window under icomplete-mode X-Git-Tag: emacs-28.0.90~5935 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de6844b62468258b3dc89ba40fc63480dc4d854c;p=emacs.git Fix cursor display in mini-window under icomplete-mode * src/xdisp.c (resize_mini_window): When we show only part of the mini-window's contents, make sure the window-start position is at the beginning of a screen line. (Bug#43519) --- diff --git a/src/xdisp.c b/src/xdisp.c index ac5307f4acc..8fadff972f0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11809,6 +11809,16 @@ resize_mini_window (struct window *w, bool exact_p) height = (max_height / unit) * unit; init_iterator (&it, w, ZV, ZV_BYTE, NULL, DEFAULT_FACE_ID); move_it_vertically_backward (&it, height - unit); + /* The following move is usually a no-op when the stuff + displayed in the mini-window comes entirely from buffer + text, but it is needed when some of it comes from overlay + strings, especially when there's an after-string at ZV. + This happens with some completion packages, like + icomplete, ido-vertical, etc. With those packages, if we + don't force w->start to be at the beginning of a screen + line, important parts of the stuff in the mini-window, + such as user prompt, will be hidden from view. */ + move_it_by_lines (&it, 0); start = it.current.pos; } else