- full_signature = g_strconcat ("\n--\n", signature, NULL);
- if (gtk_text_iter_forward_search (&iter, full_signature, 0, &match_start, &match_end, NULL)) {
+ GtkTextIter match_start, match_end;
+ /* We cannot use
+ MODEST_TEXT_UTILS_SIGNATURE_MARKER as it
+ seems that the search has some problems
+ with the blank space at the end */
+ if (gtk_text_iter_forward_search (&iter, "--",
+ GTK_TEXT_SEARCH_TEXT_ONLY,
+ &match_start, NULL, NULL)) {
+ gtk_text_buffer_get_end_iter (priv->text_buffer ,&match_end);