Fix bug #492305 (see description in the changelog).
authorDarko Koruga <darko@users.sourceforge.net>
Fri, 14 Dec 2001 06:26:36 +0000 (06:26 +0000)
committerDarko Koruga <darko@users.sourceforge.net>
Fri, 14 Dec 2001 06:26:36 +0000 (06:26 +0000)
ChangeLog.claws
configure.in
src/compose.c

index 9a7286d298029082e17a967e7783fbb1211330b7..a02635e33e68c076a37dceaf1dce76029267a6ab 100644 (file)
@@ -1,3 +1,10 @@
+2001-12-14 [darko]     0.6.5claws84
+
+       * src/compose.c
+               fix crash when wrapping long lines if linewrap quotation
+               is disabled and wrapper encounters a word spanning more
+               than one line
+
 2001-12-13 [paul]      0.6.5claws83
 
        * src/compose.c
 2001-12-13 [paul]      0.6.5claws83
 
        * src/compose.c
index a87213d085188889170ea13d4eef21f07b86d73b..4217c5ca2a5093646c8dc5b46c45a7f89ae6c396 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws83
+EXTRA_VERSION=claws84
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 0f69a4123952dfa57467aa704ed5aa9ca73a45be..c8ebea65e56a195e515bc36285496da2e43476c0 100644 (file)
@@ -2178,14 +2178,16 @@ static void compose_wrap_line_all(Compose *compose)
 
        for (; cur_pos < tlen; cur_pos++) {
                /* mark position of new line - needed for quotation wrap */
 
        for (; cur_pos < tlen; cur_pos++) {
                /* mark position of new line - needed for quotation wrap */
-               if (linewrap_quote && is_new_line) {
-                       qlen = gtkut_text_str_compare
-                               (text, cur_pos, tlen, qfmt);
+               if (is_new_line) {
+                       if (linewrap_quote && is_new_line) {
+                               qlen = gtkut_text_str_compare
+                                       (text, cur_pos, tlen, qfmt);
+                               if (qlen)
+                                       i_len = get_indent_length(text, cur_pos, tlen);
+                               else
+                                       i_len = 0;
+                       }
                        is_new_line = FALSE;
                        is_new_line = FALSE;
-                       if (qlen)
-                               i_len = get_indent_length(text, cur_pos, tlen);
-                       else
-                               i_len = 0;
                        p_pos = cur_pos;
 #ifdef WRAP_DEBUG
                        printf("new line i_len=%d qlen=%d p_pos=", i_len, qlen);
                        p_pos = cur_pos;
 #ifdef WRAP_DEBUG
                        printf("new line i_len=%d qlen=%d p_pos=", i_len, qlen);