Skip to content

Commit 472fd30

Browse files
authored
Merge pull request #5115 from myk002/myk_suspend_lineedit
don't auto-suspend the core for lineedit commands
2 parents ebac377 + 98d6438 commit 472fd30

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

plugins/liquids.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <Plug
7171
"liquids",
7272
"Place magma, water or obsidian.",
7373
df_liquids,
74-
true)); // interactive, needs console for prompt
74+
true, true)); // interactive, needs console for prompt
7575
commands.push_back(PluginCommand(
7676
"liquids-here",
7777
"Use settings from liquids at cursor position.",
@@ -368,6 +368,7 @@ command_result df_liquids (color_ostream &out_, vector <string> & parameters)
368368
cur_mode.amount = 7;
369369
else if(command.empty())
370370
{
371+
CoreSuspender suspend;
371372
df_liquids_execute(out);
372373
}
373374
else

plugins/tiletypes.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ command_result df_tiletypes_here_point (color_ostream &out, vector <string> & pa
9393
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
9494
{
9595
tiletypes_hist.load(HISTORY_FILE);
96-
commands.push_back(PluginCommand("tiletypes", "Paints tiles of specified types onto the map.", df_tiletypes, true));
96+
commands.push_back(PluginCommand("tiletypes", "Paints tiles of specified types onto the map.", df_tiletypes, true, true));
9797
commands.push_back(PluginCommand("tiletypes-command", "Run tiletypes commands (seperated by ' ; ')", df_tiletypes_command));
9898
commands.push_back(PluginCommand("tiletypes-here", "Repeat tiletypes command at cursor (with brush)", df_tiletypes_here));
9999
commands.push_back(PluginCommand("tiletypes-here-point", "Repeat tiletypes command at cursor (with single tile brush)", df_tiletypes_here_point));
@@ -1316,11 +1316,12 @@ command_result df_tiletypes (color_ostream &out_, vector <string> & parameters)
13161316
commands.clear();
13171317
Core::cheap_tokenise(input, commands);
13181318

1319-
command_result ret = processCommand(out, commands, 0, commands.size(), end, true);
1320-
1321-
if (ret != CR_OK)
13221319
{
1323-
return ret;
1320+
CoreSuspender suspend;
1321+
command_result ret = processCommand(out, commands, 0, commands.size(), end, true);
1322+
1323+
if (ret != CR_OK)
1324+
return ret;
13241325
}
13251326
}
13261327
return CR_OK;

0 commit comments

Comments
 (0)