/[weechat]/weechat/src/gui/curses/gui-display.c
ViewVC logotype

Diff of /weechat/src/gui/curses/gui-display.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.144 by flashcode, Tue Nov 29 10:11:21 2005 UTC revision 1.145 by flashcode, Tue Nov 29 16:15:21 2005 UTC
# Line 1231  gui_display_line (t_gui_window *window, Line 1231  gui_display_line (t_gui_window *window,
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            
# Line 1273  gui_display_line (t_gui_window *window, Line 1272  gui_display_line (t_gui_window *window,
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,
# Line 1284  gui_display_line (t_gui_window *window, Line 1282  gui_display_line (t_gui_window *window,
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);
# Line 1306  gui_display_line (t_gui_window *window, Line 1304  gui_display_line (t_gui_window *window,
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,
# Line 1325  gui_display_line (t_gui_window *window, Line 1318  gui_display_line (t_gui_window *window,
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                      {                      {

Legend:
Removed from v.1.144  
changed lines
  Added in v.1.145

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26