diff --git a/Models/Entry.cs b/Models/Entry.cs index a65f1f9..a536fcf 100644 --- a/Models/Entry.cs +++ b/Models/Entry.cs @@ -112,7 +112,12 @@ public string GetTooltip(bool showPlayers, bool showTerrors) public void CopyToClipboard() { - Clipboard.SetText(Content); + Clipboard.SetDataObject( + Content, // Text to store in clipboard + false, // Do not keep after our application exits + 4, // Retry 4 times + 200); + // Clipboard.SetText(Content); } } } diff --git a/Windows/MainWindow.cs b/Windows/MainWindow.cs index e738931..c5b0ed1 100644 --- a/Windows/MainWindow.cs +++ b/Windows/MainWindow.cs @@ -516,6 +516,11 @@ private bool HandleSaveCode(string line, DateTime timestamp, LogContext context) end -= index; string save = line.Substring(index, end); + if (string.IsNullOrEmpty(save)) { + context.Set(SaveInitKey, false); + return false; + } + AddLogEntry(context.DateKey, save, timestamp, context); context.Set(SaveInitKey, false); return true;