1231 |
int read_marker_x, read_marker_y; |
int read_marker_x, read_marker_y; |
1232 |
int word_start_offset, word_end_offset; |
int word_start_offset, word_end_offset; |
1233 |
int word_length_with_spaces, word_length; |
int word_length_with_spaces, word_length; |
|
int skip_spaces; |
|
1234 |
char *ptr_data, *ptr_end_offset, *next_char, *prev_char; |
char *ptr_data, *ptr_end_offset, *next_char, *prev_char; |
1235 |
char *ptr_style, saved_char; |
char *ptr_style, saved_char; |
1236 |
|
|
1272 |
ptr_data = line->data; |
ptr_data = line->data; |
1273 |
while (ptr_data && ptr_data[0]) |
while (ptr_data && ptr_data[0]) |
1274 |
{ |
{ |
|
skip_spaces = 0; |
|
1275 |
gui_get_word_info (window, |
gui_get_word_info (window, |
1276 |
ptr_data, |
ptr_data, |
1277 |
&word_start_offset, |
&word_start_offset, |
1282 |
|
|
1283 |
if (word_length > 0) |
if (word_length > 0) |
1284 |
{ |
{ |
1285 |
/* spaces + word too long for current line */ |
/* spaces + word too long for current line but ok for next line */ |
1286 |
if ((window->win_chat_cursor_x + word_length_with_spaces > window->win_chat_width) |
if ((window->win_chat_cursor_x + word_length_with_spaces > window->win_chat_width) |
1287 |
&& (word_length < window->win_chat_width - line->length_align)) |
&& (word_length <= window->win_chat_width - line->length_align)) |
1288 |
{ |
{ |
1289 |
gui_display_new_line (window, num_lines, count, |
gui_display_new_line (window, num_lines, count, |
1290 |
&lines_displayed, simulate); |
&lines_displayed, simulate); |
1304 |
ptr_data += word_start_offset; |
ptr_data += word_start_offset; |
1305 |
} |
} |
1306 |
|
|
|
/* word is exactly remaining width => we'll skip next leading spaces for next line */ |
|
|
if (word_length == window->win_chat_width - |
|
|
((window->win_chat_cursor_x == 0) ? line->length_align : window->win_chat_cursor_x)) |
|
|
skip_spaces = 1; |
|
|
|
|
1307 |
/* display word */ |
/* display word */ |
1308 |
gui_display_word (window, line, ptr_data, |
gui_display_word (window, line, ptr_data, |
1309 |
ptr_end_offset, |
ptr_end_offset, |
1318 |
if (*(ptr_data - 1) == '\0') |
if (*(ptr_data - 1) == '\0') |
1319 |
ptr_data = NULL; |
ptr_data = NULL; |
1320 |
|
|
1321 |
/* skip leading spaces? */ |
if (window->win_chat_cursor_x == 0) |
|
if (skip_spaces) |
|
1322 |
{ |
{ |
1323 |
while (ptr_data && (ptr_data[0] == ' ')) |
while (ptr_data && (ptr_data[0] == ' ')) |
1324 |
{ |
{ |