[PATCH] wineconsole: Add InsertMode to the cfg data struct
Hugh McMaster
hugh.mcmaster at outlook.com
Tue May 5 07:22:04 CDT 2015
---
programs/wineconsole/wineconsole.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index ed5f816..07cae5c 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -150,6 +150,25 @@ static BOOL WINECON_SetHistoryMode(HANDLE hConIn, int mode)
}
/******************************************************************
+ * WINECON_SetInsertMode
+ *
+ *
+ */
+static BOOL WINECON_SetInsertMode(HANDLE hConIn, int value)
+{
+ DWORD mode;
+
+ GetConsoleMode(hConIn, &mode);
+
+ if (value)
+ mode |= ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS;
+ else
+ mode &= ~ENABLE_INSERT_MODE;
+
+ return SetConsoleMode(hConIn, mode);
+}
+
+/******************************************************************
* WINECON_GetConsoleTitle
*
*
@@ -397,6 +416,11 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
data->curcfg.history_nodup = cfg->history_nodup;
WINECON_SetHistoryMode(data->hConIn, cfg->history_nodup);
}
+ if (data->curcfg.insert_mode != cfg->insert_mode)
+ {
+ data->curcfg.insert_mode = cfg->insert_mode;
+ WINECON_SetInsertMode(data->hConIn, cfg->insert_mode);
+ }
data->curcfg.menu_mask = cfg->menu_mask;
data->curcfg.quick_edit = cfg->quick_edit;
if (1 /* FIXME: font info has changed */)
--
1.9.1
More information about the wine-patches
mailing list