| 2960 gdk_text_measure(cfont, text, num) < 0) { |
2960 gdk_text_measure(cfont, text, num) < 0) { |
| 2961 int pos = num / 2; |
2961 int pos = num / 2; |
| 2962 static int count = 0; |
2962 static int count = 0; |
| 2963 count ++; |
2963 count ++; |
| 2964 while (pos < num && (!isspace(text[pos]) || text[pos] == '\n')) pos++; |
2964 while (pos < num && (!isspace(text[pos]) || text[pos] == '\n')) pos++; |
| 2965 if (pos == num) { |
2965 if (pos >= num - 1) { |
| 2966 pos = num/2; |
2966 pos = num/2; |
| 2967 while (pos > 0 && (!isspace(text[pos]) || text[pos] == '\n')) pos--; |
2967 while (pos > 0 && (!isspace(text[pos]) || text[pos] == '\n')) pos--; |
| 2968 if (!pos) pos = num / 2; |
2968 if (!pos) pos = num / 2; |
| 2969 } |
2969 } |
| 2970 gtk_html_add_text(html, cfont, fore, back, text, pos + 1, uline, strike, url); |
2970 gtk_html_add_text(html, cfont, fore, back, text, pos + 1, uline, strike, url); |