# HG changeset patch # User Gary Kramlich # Date 1152748376 0 # Node ID 11434fa0ca22930cc82c591e5d196c848fce87b6 # Parent 25c55fb4b512730e39dc5e57e756e5a060dc1f99 [gaim-migrate @ 16489] Patch from sadrul for: If you have a markup "abc 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 diff -r 25c55fb4b512 -r 11434fa0ca22 src/gtkimhtml.c --- 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 */