Fix copying of WB Chat Window contents
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 10 Feb 2010 09:58:29 +0000 (10:58 +0100)
committerArun Persaud <arun@nubati.net>
Sat, 20 Feb 2010 22:57:13 +0000 (14:57 -0800)
All line breks were lost on copy-pasting the contents of a chat window.
Adding CR to each outputted line in the front-end (wchat.c) solves this.

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