pidgin/pidgin

Parents 686b1fd1198d
Children 7341787d1ead
Fix an issue where when pasting

's that would cause too much whitespace to be displayed.

Testing Done:
Built and ran locally, see the screen shots.

Bugs closed: PIDGIN-17437

Reviewed at https://reviews.imfreedom.org/r/504/

--- a/pidgin/gtkimhtml.c Sat Feb 13 01:15:36 2021 -0600
+++ b/pidgin/gtkimhtml.c Sat Feb 13 20:15:01 2021 -0600
@@ -2859,12 +2859,17 @@
case 25: /* BR */
case 58: /* BR/ */
case 61: /* BR (opt) */
- case 29: /* P */
- case 30: /* /P */
ws[wpos] = '\n';
wpos++;
br = TRUE;
break;
+ case 29: /* P */
+ if(wpos > 0) {
+ ws[wpos] = '\n';
+ wpos++;
+ br = TRUE;
+ }
+ break;
case 26: /* HR */
case 42: /* HR (opt) */
{
@@ -2934,6 +2939,7 @@
ws[0] = '\0'; wpos = 0;
break;
+ case 30: /* /P */
case 31: /* H3 */
case 32: /* /H3 */
case 33: /* HTML */