Mercurial > pidgin
diff src/gtkimhtml.c @ 13948:11434fa0ca22
[gaim-migrate @ 16489]
Patch from sadrul for:
If you have a markup "abc </i> def", then the "def"
part of the message shows up in italic. The same error
happens for broken markup for underline/bold
attributes. This patch is a fix that.
Compiles fine here...
committer: Tailor Script <tailor@pidgin.im>
| author | Gary Kramlich <grim@reaperworld.com> |
|---|---|
| date | Wed, 12 Jul 2006 23:52:56 +0000 |
| parents | 40612ca80643 |
| children | 8bda65b88e49 |
line wrap: on
line diff
--- a/src/gtkimhtml.c Tue Jul 11 20:47:11 2006 +0000 +++ b/src/gtkimhtml.c Wed Jul 12 23:52:56 2006 +0000 @@ -2461,10 +2461,11 @@ gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); ws[0] = '\0'; wpos = 0; - if (bold) + if (bold) { bold--; - if ((bold == 0) && (imhtml->format_functions & GTK_IMHTML_BOLD) && !imhtml->wbfo) - gtk_imhtml_toggle_bold(imhtml); + if ((bold == 0) && (imhtml->format_functions & GTK_IMHTML_BOLD) && !imhtml->wbfo) + gtk_imhtml_toggle_bold(imhtml); + } } break; case 5: /* I */ @@ -2484,10 +2485,11 @@ if (!(options & GTK_IMHTML_NO_FORMATTING)) { gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); ws[0] = '\0'; wpos = 0; - if (italics) + if (italics) { italics--; - if ((italics == 0) && (imhtml->format_functions & GTK_IMHTML_ITALIC) && !imhtml->wbfo) - gtk_imhtml_toggle_italic(imhtml); + if ((italics == 0) && (imhtml->format_functions & GTK_IMHTML_ITALIC) && !imhtml->wbfo) + gtk_imhtml_toggle_italic(imhtml); + } } break; case 9: /* U */ @@ -2505,10 +2507,11 @@ if (!(options & GTK_IMHTML_NO_FORMATTING)) { gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); ws[0] = '\0'; wpos = 0; - if (underline) + if (underline) { underline--; - if ((underline == 0) && (imhtml->format_functions & GTK_IMHTML_UNDERLINE) && !imhtml->wbfo) - gtk_imhtml_toggle_underline(imhtml); + if ((underline == 0) && (imhtml->format_functions & GTK_IMHTML_UNDERLINE) && !imhtml->wbfo) + gtk_imhtml_toggle_underline(imhtml); + } } break; case 13: /* S */
