summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2020-11-11 21:46:43 +0200
committerEli Zaretskii <eliz@gnu.org>2020-11-11 21:46:43 +0200
commitf43e9ad524b5d23dd9434e5d70bd95142207d601 (patch)
tree51bb29667f1ab9dc204a7e38bb2d4cab7664f6e9 /src
parent658952a57a48c3cd80d62fcf0199ab9432ef8166 (diff)
downloademacs-f43e9ad524b5d23dd9434e5d70bd95142207d601.tar.gz
Avoid crashes in the daemon due to user interaction
* src/minibuf.c (read_minibuf): Avoid crashes in the daemon if the init file invokes some kind of minibuffer interaction, by not updating the selected frame if it's the initial frame. (Bug#44583)
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index b837cc53eb9..135655064a3 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -666,7 +666,8 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
/* If cursor is on the minibuffer line,
show the user we have exited by putting it in column 0. */
if (XWINDOW (minibuf_window)->cursor.vpos >= 0
- && !noninteractive)
+ && !noninteractive
+ && !FRAME_INITIAL_P (SELECTED_FRAME ()))
{
XWINDOW (minibuf_window)->cursor.hpos = 0;
XWINDOW (minibuf_window)->cursor.x = 0;