diff --git a/trunk/Editor/SyntaxRichTextBox.cs b/trunk/Editor/SyntaxRichTextBox.cs
index ddb55d9..2a1866a 100644
--- a/trunk/Editor/SyntaxRichTextBox.cs
+++ b/trunk/Editor/SyntaxRichTextBox.cs
@@ -899,9 +899,15 @@ namespace LSLEditor
public new void Paste()
{
- ResetHighlichting();
+ ResetHighlighting();
- if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text, true))
+ // First try with Unicode
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.UnicodeText, true))
+ {
+ string strTextToPaste = Clipboard.GetDataObject().GetData(DataFormats.UnicodeText, true).ToString().Replace("\r", "");
+ this.ColoredText = strTextToPaste;
+ } // failing that try ANSI text.
+ else if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text, true))
{
string strTextToPaste = Clipboard.GetDataObject().GetData(DataFormats.Text, true).ToString().Replace("\r", "");
this.ColoredText = strTextToPaste;
@@ -1147,7 +1153,7 @@ namespace LSLEditor
protected override void OnKeyPress(KeyPressEventArgs e)
{
- ResetHighlichting();
+ ResetHighlighting();
char keyChar = e.KeyChar;
@@ -1743,19 +1749,23 @@ namespace LSLEditor
{
BeginUpdate();
- ResetHighlichting();
+ ResetHighlighting();
string strW = GetNewWhiteSpace(-1);
int intTabs = (int)(strW.Length / AutoFormatter.GetTab().Length);
- if (this.SelectionLength == 0)
+ int intLastLine = this.GetLineFromCharIndex(this.SelectionStart + this.SelectionLength);
+
+ int intLine = this.GetLineFromCharIndex(this.SelectionStart);
+ this.SelectionStart = this.GetFirstCharIndexFromLine(intLine);
+ int intLength = 0;
+ do
{
- int intLine = this.GetLineFromCharIndex(this.SelectionStart);
- int intStart = this.GetFirstCharIndexFromLine(intLine);
- int intLength = this.Lines[intLine].Length + 1;
- this.SelectionStart = intStart;
- this.SelectionLength = intLength;
- }
+ intLength += this.Lines[intLine].Length + 1;
+ intLine++;
+ } while (intLine <= intLastLine);
+ this.SelectionLength = intLength;
+
string strSelectedText = AutoFormatter.MultiLineComment(blnAdd, intTabs, this.SelectedText);
int intBackup = this.SelectionStart;
@@ -1888,7 +1898,7 @@ namespace LSLEditor
}
}
- private void ResetHighlichting()
+ private void ResetHighlighting()
{
if (HighLightList.Count == 0)
return;
diff --git a/trunk/Helpers/LSL2CSharp.cs b/trunk/Helpers/LSL2CSharp.cs
index 83ab770..cf8f33c 100644
--- a/trunk/Helpers/LSL2CSharp.cs
+++ b/trunk/Helpers/LSL2CSharp.cs
@@ -175,7 +175,7 @@ namespace LSLEditor
// State change, excluding global functions
regex = new Regex(
- @"(\s+)state\s+(\w*)(\s*;)",
+ @"(\s+)state\s+(\w+)(\s*;)",
RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
diff --git a/trunk/LSLEditor.RES b/trunk/LSLEditor.RES
index 26017d1..9367eaf 100644
Binary files a/trunk/LSLEditor.RES and b/trunk/LSLEditor.RES differ
diff --git a/trunk/LSLEditorForm.Designer.cs b/trunk/LSLEditorForm.Designer.cs
index f900448..dd2a98c 100644
--- a/trunk/LSLEditorForm.Designer.cs
+++ b/trunk/LSLEditorForm.Designer.cs
@@ -127,8 +127,8 @@ namespace LSLEditor
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.makeBugReporttoolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
@@ -140,6 +140,7 @@ namespace LSLEditor
this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.dockPanel = new LSLEditor.Docking.DockPanel();
+ this.releaseNotesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
@@ -207,8 +208,8 @@ namespace LSLEditor
// newProjectToolStripMenuItem
//
this.newProjectToolStripMenuItem.Name = "newProjectToolStripMenuItem";
- this.newProjectToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
- | System.Windows.Forms.Keys.N)));
+ this.newProjectToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
+ | System.Windows.Forms.Keys.N)));
this.newProjectToolStripMenuItem.Size = new System.Drawing.Size(202, 22);
this.newProjectToolStripMenuItem.Text = "Solution...";
this.newProjectToolStripMenuItem.Click += new System.EventHandler(this.newProjectToolStripMenuItem_Click);
@@ -241,8 +242,8 @@ namespace LSLEditor
// openProjectSolutionToolStripMenuItem
//
this.openProjectSolutionToolStripMenuItem.Name = "openProjectSolutionToolStripMenuItem";
- this.openProjectSolutionToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
- | System.Windows.Forms.Keys.O)));
+ this.openProjectSolutionToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
+ | System.Windows.Forms.Keys.O)));
this.openProjectSolutionToolStripMenuItem.Size = new System.Drawing.Size(244, 22);
this.openProjectSolutionToolStripMenuItem.Text = "Project/Solution...";
this.openProjectSolutionToolStripMenuItem.Click += new System.EventHandler(this.openProjectSolutionToolStripMenuItem_Click);
@@ -350,8 +351,8 @@ namespace LSLEditor
//
this.SaveAllToolStripMenuItem.Image = global::LSLEditor.Properties.Resources.SAVEAS;
this.SaveAllToolStripMenuItem.Name = "SaveAllToolStripMenuItem";
- this.SaveAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
- | System.Windows.Forms.Keys.S)));
+ this.SaveAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
+ | System.Windows.Forms.Keys.S)));
this.SaveAllToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.SaveAllToolStripMenuItem.Text = "Save All";
this.SaveAllToolStripMenuItem.Click += new System.EventHandler(this.SaveAllToolStripMenuItem_Click);
@@ -524,8 +525,8 @@ namespace LSLEditor
// toolStripMenuItem8
//
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
- this.toolStripMenuItem8.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
- | System.Windows.Forms.Keys.A)));
+ this.toolStripMenuItem8.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
+ | System.Windows.Forms.Keys.A)));
this.toolStripMenuItem8.Size = new System.Drawing.Size(225, 22);
this.toolStripMenuItem8.Text = "Select All to SL";
this.toolStripMenuItem8.Click += new System.EventHandler(this.toolStripMenuItem8_Click);
@@ -665,8 +666,8 @@ namespace LSLEditor
//
this.addNewObjecttoolStripMenuItem.Enabled = false;
this.addNewObjecttoolStripMenuItem.Name = "addNewObjecttoolStripMenuItem";
- this.addNewObjecttoolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
- | System.Windows.Forms.Keys.A)));
+ this.addNewObjecttoolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
+ | System.Windows.Forms.Keys.A)));
this.addNewObjecttoolStripMenuItem.Size = new System.Drawing.Size(235, 22);
this.addNewObjecttoolStripMenuItem.Text = "Add New Object";
this.addNewObjecttoolStripMenuItem.Click += new System.EventHandler(this.addNewObjecttoolStripMenuItem_Click);
@@ -732,7 +733,7 @@ namespace LSLEditor
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
- this.optionsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.optionsToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
this.optionsToolStripMenuItem.Text = "Options...";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
//
@@ -785,6 +786,7 @@ namespace LSLEditor
this.toolStripSeparator9,
this.makeBugReporttoolStripMenuItem,
this.toolStripSeparator12,
+ this.releaseNotesToolStripMenuItem,
this.aboutToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
@@ -830,11 +832,6 @@ namespace LSLEditor
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(207, 6);
//
- // toolStripSeparator12
- //
- this.toolStripSeparator12.Name = "toolStripSeparator12";
- this.toolStripSeparator12.Size = new System.Drawing.Size(207, 6);
- //
// makeBugReporttoolStripMenuItem
//
this.makeBugReporttoolStripMenuItem.Name = "makeBugReporttoolStripMenuItem";
@@ -842,6 +839,11 @@ namespace LSLEditor
this.makeBugReporttoolStripMenuItem.Text = "Bug report...";
this.makeBugReporttoolStripMenuItem.Click += new System.EventHandler(this.makeBugReporttoolStripMenuItem_Click);
//
+ // toolStripSeparator12
+ //
+ this.toolStripSeparator12.Name = "toolStripSeparator12";
+ this.toolStripSeparator12.Size = new System.Drawing.Size(207, 6);
+ //
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
@@ -940,6 +942,13 @@ namespace LSLEditor
this.dockPanel.Skin = dockPanelSkin1;
this.dockPanel.TabIndex = 10;
//
+ // releaseNotesToolStripMenuItem
+ //
+ this.releaseNotesToolStripMenuItem.Name = "releaseNotesToolStripMenuItem";
+ this.releaseNotesToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
+ this.releaseNotesToolStripMenuItem.Text = "Release Notes...";
+ this.releaseNotesToolStripMenuItem.Click += new System.EventHandler(this.releaseNotesToolStripMenuItem_Click);
+ //
// LSLEditorForm
//
this.AllowDrop = true;
@@ -1066,5 +1075,6 @@ namespace LSLEditor
private System.Windows.Forms.ToolStripSeparator toolStripSeparator16;
private System.Windows.Forms.ToolStripMenuItem closeActiveWindowToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem9;
+ private System.Windows.Forms.ToolStripMenuItem releaseNotesToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/trunk/LSLEditorForm.cs b/trunk/LSLEditorForm.cs
index 6dc24f3..ad93475 100644
--- a/trunk/LSLEditorForm.cs
+++ b/trunk/LSLEditorForm.cs
@@ -1245,7 +1245,7 @@ namespace LSLEditor
}
}
- private void ReleaseNotesToolStripMenuItem_Click(object sender, EventArgs e)
+ private void releaseNotesToolStripMenuItem_Click(object sender, EventArgs e)
{
Browser browser = GetBrowser();
string strExeFileName = Path.GetFileName(Assembly.GetExecutingAssembly().CodeBase);
@@ -1699,11 +1699,7 @@ namespace LSLEditor
{
if (lslint.HasErrors)
{
- //TODO: Show errors somewhere else
- //this.panel1.Controls.Clear();
- //this.panel1.Controls.Add(this.SyntaxErrors);
- //this.panel1.Visible = true;
- //this.splitter1.SplitPosition = Properties.Settings.Default.SimulatorSize.Height;
+ this.SyntaxErrors.Show(dockPanel);
}
else
{
diff --git a/trunk/Properties/Settings.Designer.cs b/trunk/Properties/Settings.Designer.cs
index 7a45e8e..34fd218 100644
--- a/trunk/Properties/Settings.Designer.cs
+++ b/trunk/Properties/Settings.Designer.cs
@@ -866,18 +866,6 @@ namespace LSLEditor.Properties {
}
}
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("ANSI")]
- public string OutputFormat {
- get {
- return ((string)(this["OutputFormat"]));
- }
- set {
- this["OutputFormat"] = value;
- }
- }
-
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
@@ -1222,11 +1210,23 @@ namespace LSLEditor.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("2.43")]
+ [global::System.Configuration.DefaultSettingValueAttribute("2.44.0")]
public string Version {
get {
return ((string)(this["Version"]));
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("UTF-8")]
+ public string OutputFormat {
+ get {
+ return ((string)(this["OutputFormat"]));
+ }
+ set {
+ this["OutputFormat"] = value;
+ }
+ }
}
}
diff --git a/trunk/Properties/Settings.settings b/trunk/Properties/Settings.settings
index 7b586d2..7e44884 100644
--- a/trunk/Properties/Settings.settings
+++ b/trunk/Properties/Settings.settings
@@ -221,9 +221,6 @@