WrapEarnPass left a comment (geany/geany#4635)

```msgwin_compiler_add_string``` checks for utf8 before inserting the message, 
implying that msgwin should be user safe, i.e. owns responsibility for ensuring 
messages are well structured. 
As this seems to be the case, knowing that gtk_list_store_set displays both \r 
and \n, it seems reasonable to scan the utf8_msg to replace \r\n with \n for 
display.
Mac line endings should be unaffected, as it seems \r is displayed.

I would propose something like:
```
        if(strstr( utf8_msg ,"\r\n")){
                gtemp = g_string_new (utf8_msg);
                g_string_replace(gtemp,"\r\n","\n",0);
                g_free(utf8_msg);
                utf8_msg = g_string_free_and_steal(gtemp);
        }
```
It will need to be added to:
msgwin_compiler_add_string 
msgwin_msg_add_string
msgwin_status_add_string

Entirely unrelated to #1950.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/4635#issuecomment-5084524220
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/4635/[email protected]>

Reply via email to