Fix copying of WB Chat Window contents
[xboard.git] / winboard / wchat.c
index 93e5ee1..4cf8dce 100644 (file)
@@ -279,5 +279,7 @@ void OutputChatMessage(int partner, char *text)
 {\r
        if(!chatHandle[partner]) return;\r
 \r
+       int n = strlen(text);\r
+       text[n+1] = 0; text[n] = '\n'; text[n-1] = '\r'; // Needs CR to not lose line breaks on copy-paste\r
        InsertIntoMemo(chatHandle[partner], text);\r
 }\r