@@ -691,7 +691,7 @@ static bool get_options(blueprint_options &opts,
691691 !Lua::PushModulePublic (
692692 out, L, " plugins.blueprint" , " parse_commandline" ))
693693 {
694- out.printerr (" Failed to load blueprint Lua code" );
694+ out.printerr (" Failed to load blueprint Lua code\n " );
695695 return false ;
696696 }
697697
@@ -706,28 +706,6 @@ static bool get_options(blueprint_options &opts,
706706 return true ;
707707}
708708
709- static bool do_gui (const vector<string> ¶meters)
710- {
711- auto L = Lua::Core::State;
712- color_ostream_proxy out (Core::getInstance ().getConsole ());
713- Lua::StackUnwinder top (L);
714-
715- if (!lua_checkstack (L, parameters.size () + 1 ) ||
716- !Lua::PushModulePublic (out, L, " plugins.blueprint" , " do_gui" ))
717- {
718- out.printerr (" Failed to load blueprint Lua code" );
719- return false ;
720- }
721-
722- for (const string ¶m : parameters)
723- Lua::Push (L, param);
724-
725- if (!Lua::SafeCall (out, L, parameters.size (), 0 ))
726- return false ;
727-
728- return true ;
729- }
730-
731709static void print_help ()
732710{
733711 auto L = Lua::Core::State;
@@ -738,15 +716,25 @@ static void print_help()
738716 !Lua::PushModulePublic (out, L, " plugins.blueprint" , " print_help" ) ||
739717 !Lua::SafeCall (out, L, 0 , 0 ))
740718 {
741- out.printerr (" Failed to load blueprint Lua code" );
719+ out.printerr (" Failed to load blueprint Lua code\n " );
742720 }
743721}
744722
745723command_result blueprint (color_ostream &out, vector<string> ¶meters)
746724{
747725 if (parameters.size () >= 1 && parameters[0 ] == " gui" )
748726 {
749- return do_gui (parameters) ? CR_OK : CR_FAILURE ;
727+ std::ostringstream command;
728+ command << " gui/blueprint" ;
729+ for (const string ¶m : parameters)
730+ {
731+ command << " " << param;
732+ }
733+ string command_str = command.str ();
734+ out.print (" launching %s\n " , command_str.c_str ());
735+
736+ Core::getInstance ().setHotkeyCmd (command_str);
737+ return CR_OK ;
750738 }
751739
752740 blueprint_options options;
0 commit comments