diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index 0d2675d..7ec7e8f 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -986,21 +986,11 @@ private void RichTextBox_TextChanged(object sender, EventArgs e) if (!Text.Contains("*")) { Text = Text.Insert(0, "*"); - } - } - else - { - if (Text.Contains("*")) - { - Text = Text.Replace("*", string.Empty); - } - } - - if (richTextBox.TextLength == 0) - { - if (Text.Contains("*")) - { - Text = Text.Replace("*", string.Empty); + if (string.IsNullOrEmpty(PublicVar.openFileName) & richTextBox.TextLength > 0) + { + Text = "Unnamed.cnp" + " – " + PublicVar.appName; + Text = Text.Insert(0, "*"); + } } } }