1From 25102012a19a67f3153e8024890751ee45335a5f Mon Sep 17 00:00:00 2001
2From: Michael Forney <mforney@mforney.org>
3Date: Mon, 31 May 2021 16:37:09 -0700
4Subject: [PATCH] Break out of input loop when UI is hidden
5
6Otherwise, wget_wch() is called immediately after hiding the UI
7with M-l, which restores curses mode when using NetBSD's libcurses.
8---
9 input.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/input.c b/input.c
13index 9334315..a958b89 100644
14--- a/input.c
15+++ b/input.c
16@@ -544,7 +544,7 @@ void inputRead(void) {
17
18 wint_t ch;
19 static bool paste, style, literal;
20- for (int ret; ERR != (ret = wget_wch(uiInput, &ch));) {
21+ for (int ret; !waiting && ERR != (ret = wget_wch(uiInput, &ch));) {
22 bool tabbing = false;
23 size_t pos = edits[tab.id].pos;
24 bool spr = uiSpoilerReveal;
25--
262.49.0
27