LuaWriter. It will now color black unmatches in the text. Also fixed a bug that randomly selects a small block of text.
This commit is contained in:
parent
2e71b04de4
commit
4b3971a997
|
@ -117,9 +117,6 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="StatusSlot0.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>126, 17</value>
|
||||
</metadata>
|
||||
|
@ -127,6 +124,6 @@
|
|||
<value>236, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>30</value>
|
||||
<value>43</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -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;
|
||||
curPos = keyWordMatch.Index + keyWordMatch.Length;
|
||||
}
|
||||
LuaText.Select(curPos, selPos);
|
||||
LuaText.SelectionColor = Color.Black;
|
||||
}
|
||||
|
||||
LuaText.Select(selPos, selChars);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue