diff --git a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index 14fb548164..61da71b365 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -37,7 +37,7 @@ namespace BizHawk.Client.EmuHawk }; InitializeComponent(); - LuaImp = new EmuLuaLibrary(this); + Closing += (o, e) => { if (AskSaveChanges()) @@ -54,8 +54,6 @@ namespace BizHawk.Client.EmuHawk LuaListView.QueryItemText += LuaListView_QueryItemText; LuaListView.QueryItemBkColor += LuaListView_QueryItemBkColor; LuaListView.VirtualMode = true; - - InputBox.AutoCompleteCustomSource.AddRange(LuaImp.Docs.Select(a => a.Library + "." + a.Name).ToArray()); } public EmuLuaLibrary LuaImp { get; set; } @@ -105,6 +103,8 @@ namespace BizHawk.Client.EmuHawk public void Restart() { + LuaImp = new EmuLuaLibrary(this); + InputBox.AutoCompleteCustomSource.AddRange(LuaImp.Docs.Select(a => a.Library + "." + a.Name).ToArray()); UpdateDialog(); }