bug fixed upstream, so change the patch to have the same code.

ok aja@.
This commit is contained in:
rpointel 2015-01-29 07:07:39 +00:00
parent 2df9c8cac8
commit c35a581869
2 changed files with 13 additions and 35 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.104 2014/07/21 08:10:09 rpointel Exp $
# $OpenBSD: Makefile,v 1.105 2015/01/29 07:07:39 rpointel Exp $
COMMENT = lightweight and user-friendly e-mail client
DISTNAME = sylpheed-3.4.2
REVISION = 0
SHARED_LIBS += sylph-0 3.0 # 3.0
SHARED_LIBS += sylpheed-plugin-0 3.0 # 3.0

View File

@ -1,39 +1,16 @@
$OpenBSD: patch-src_gtkutils_c,v 1.1 2014/07/21 08:10:09 rpointel Exp $
$OpenBSD: patch-src_gtkutils_c,v 1.2 2015/01/29 07:07:39 rpointel Exp $
issue 215: http://sylpheed.sraoss.jp/redmine/issues/215
Fixed upstream: http://sylpheed.sraoss.jp/redmine/projects/sylpheed/repository/revisions/3462/diff/src/gtkutils.c
--- src/gtkutils.c.orig Thu Feb 10 07:53:45 2011
+++ src/gtkutils.c Fri Jul 18 09:29:46 2014
@@ -912,18 +912,22 @@ void gtkut_text_buffer_insert_with_tag_by_name(GtkText
if (len < 0)
len = strlen(text);
- gtk_text_buffer_insert_with_tags_by_name
- (buffer, iter, text, len, tag, NULL);
+ if(len > 0)
+ {
--- src/gtkutils.c.orig Tue Jun 10 06:06:36 2014
+++ src/gtkutils.c Thu Jan 29 07:19:22 2015
@@ -915,7 +915,7 @@ void gtkut_text_buffer_insert_with_tag_by_name(GtkText
gtk_text_buffer_insert_with_tags_by_name
(buffer, iter, text, len, tag, NULL);
- if (text[len - 1] != '\n') {
- /* somehow returns invalid value first (bug?),
- so call it twice */
- gtk_text_iter_get_chars_in_line(iter);
- if (gtk_text_iter_get_chars_in_line(iter) > MAX_TEXT_LINE_LEN) {
- gtk_text_buffer_insert_with_tags_by_name
- (buffer, iter, "\n", 1, tag, NULL);
+ gtk_text_buffer_insert_with_tags_by_name
+ (buffer, iter, text, len, tag, NULL);
+
+ if (text[len - 1] != '\n') {
+ /* somehow returns invalid value first (bug?),
+ so call it twice */
+ gtk_text_iter_get_chars_in_line(iter);
+ if (gtk_text_iter_get_chars_in_line(iter) > MAX_TEXT_LINE_LEN) {
+ gtk_text_buffer_insert_with_tags_by_name
+ (buffer, iter, "\n", 1, tag, NULL);
+ }
}
- }
+ }
}
gchar *gtkut_text_view_get_selection(GtkTextView *textview)
+ if (len > 0 && text[len - 1] != '\n') {
/* somehow returns invalid value first (bug?),
so call it twice */
gtk_text_iter_get_chars_in_line(iter);