kernel32/editline: Enabling/disabling Insert Mode via the user dialog should take effect immediately

Hugh McMaster hugh.mcmaster at outlook.com
Sun Jul 19 21:02:19 CDT 2015


Currently, if Insert Mode is enabled/disabled via the user dialog,
the new console mode does not take effect until after
CONSOLE_Readline is called again.

On Windows, this change takes effect immediately.
---
 dlls/kernel32/editline.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/kernel32/editline.c b/dlls/kernel32/editline.c
index 7664b55..581ea7c 100644
--- a/dlls/kernel32/editline.c
+++ b/dlls/kernel32/editline.c
@@ -987,6 +987,10 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn, BOOL can_pos_cursor)
 	    }
 	}
 
+        GetConsoleMode(hConsoleIn, &mode);
+        ctx.insert = (mode & (ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS)) ==
+                     (ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS) ? 1 : 0;
+
 	if (func)
 	    (func)(&ctx);
 	else if (!(ir.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED))
-- 
1.9.1




More information about the wine-patches mailing list