diff --git a/BizHawk.MultiClient/MainForm.resx b/BizHawk.MultiClient/MainForm.resx index 9673291abf..c76e0b482c 100644 --- a/BizHawk.MultiClient/MainForm.resx +++ b/BizHawk.MultiClient/MainForm.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - 126, 17 @@ -127,6 +124,6 @@ 236, 17 - 30 + 43 \ No newline at end of file diff --git a/BizHawk.MultiClient/tools/LuaWriter.cs b/BizHawk.MultiClient/tools/LuaWriter.cs index 591797f2f0..d45c9e37d8 100644 --- a/BizHawk.MultiClient/tools/LuaWriter.cs +++ b/BizHawk.MultiClient/tools/LuaWriter.cs @@ -21,14 +21,20 @@ namespace BizHawk.MultiClient private void timer_Tick(object sender, EventArgs e) { int selPos = LuaText.SelectionStart; + int selChars = LuaText.SelectedText.Length; + int curPos = 0; + foreach (Match keyWordMatch in keyWords.Matches(LuaText.Text)) { + LuaText.Select(curPos, keyWordMatch.Index); + LuaText.SelectionColor = Color.Black; LuaText.Select(keyWordMatch.Index, keyWordMatch.Length); LuaText.SelectionColor = Color.Blue; - LuaText.SelectionStart = selPos; - LuaText.SelectionColor = Color.Black; + curPos = keyWordMatch.Index + keyWordMatch.Length; } - + LuaText.Select(curPos, selPos); + LuaText.SelectionColor = Color.Black; + LuaText.Select(selPos, selChars); } }