Index: pan/text.c =================================================================== RCS file: /cvs/gnome/pan/pan/text.c,v retrieving revision 1.338 diff -u -r1.338 text.c --- pan/text.c 25 Jan 2003 01:40:58 -0000 1.338 +++ pan/text.c 31 Jan 2003 07:05:16 -0000 @@ -1176,6 +1176,11 @@ /* create the text view */ text_view = gtk_text_view_new (); + if (wrap_column==0) + { + gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view), + GTK_WRAP_WORD); + } gtk_widget_add_events (text_view, GDK_POINTER_MOTION_MASK|GDK_POINTER_MOTION_HINT_MASK); g_signal_connect (text_view, "motion_notify_event", Index: pan/base/util-wrap.c =================================================================== RCS file: /cvs/gnome/pan/pan/base/util-wrap.c,v retrieving revision 1.20 diff -u -r1.20 util-wrap.c --- pan/base/util-wrap.c 13 Dec 2002 19:33:01 -0000 1.20 +++ pan/base/util-wrap.c 31 Jan 2003 07:05:16 -0000 @@ -111,7 +111,9 @@ } /* we usually don't want to wrap really short lines */ - if (prev_content_len!=0 && prev_content_len<(wrap_column/2)) + if (prev_content_len!=0 + && wrap_column>0 + && prev_content_len<(wrap_column/2)) paragraph_end = TRUE; if (paragraph_end) /* the new line is a new paragraph, so save the old line */ @@ -187,11 +189,14 @@ { char * pch = g_strdup (p->content); const char * march; - const int wrap_len = wrap_column - strlen(p->leader); const char * line_begin = NULL; int line_len = 0; - wrap_long_lines (pch, wrap_len); + if (wrap_column > 0) + { + const int wrap_len = wrap_column - strlen(p->leader); + wrap_long_lines (pch, wrap_len); + } march = pch; if (*march=='\0') /* blank line */ @@ -220,7 +225,7 @@ /* sanity checks */ g_return_val_if_fail (is_nonempty_string(body), NULL); - g_return_val_if_fail (wrap_column>0, g_strdup(body)); + g_return_val_if_fail (wrap_column>=0, g_strdup(body)); /* get a temp copy of the body -- we don't wrap the signature. */ tmp_body = pan_substitute (body, "\r", "");