emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master de6844b: Fix cursor display in mini-window under icomplete-mode


From: Eli Zaretskii
Subject: master de6844b: Fix cursor display in mini-window under icomplete-mode
Date: Tue, 22 Sep 2020 09:53:46 -0400 (EDT)

branch: master
commit de6844b62468258b3dc89ba40fc63480dc4d854c
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 src/xdisp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/xdisp.c b/src/xdisp.c
index ac5307f..8fadff9 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]