Commit 9b9d58f0 authored by Thomas A Caswell's avatar Thomas A Caswell Committed by Steve Dower

bpo-31546: Fix input hook integration (GH-7978)

parent 4d26c8a1
Restore running PyOS_InputHook while waiting for user input at the prompt.
The restores integration of interactive GUI windows (such as Matplotlib
figures) with the prompt on Windows.
......@@ -114,6 +114,9 @@ _PyOS_WindowsConsoleReadline(HANDLE hStdIn)
wbuf = wbuf_local;
wbuflen = sizeof(wbuf_local) / sizeof(wbuf_local[0]) - 1;
while (1) {
if (PyOS_InputHook != NULL) {
(void)(PyOS_InputHook)();
}
if (!ReadConsoleW(hStdIn, &wbuf[total_read], wbuflen - total_read, &n_read, NULL)) {
err = GetLastError();
goto exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment