/[emacs]/emacs/src/xdisp.c
ViewVC logotype

Diff of /emacs/src/xdisp.c

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

revision 1.691 by gerd, Wed Oct 24 08:15:55 2001 UTC revision 1.692 by gerd, Wed Oct 24 09:11:54 2001 UTC
# Line 10705  try_window_reusing_current_matrix (w) Line 10705  try_window_reusing_current_matrix (w)
10705                int dy = it.current_y - first_row_y;                int dy = it.current_y - first_row_y;
10706                                
10707                row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);                row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
10708                while (MATRIX_ROW_DISPLAYS_TEXT_P (row))                row = row_containing_pos (w, PT, row, NULL, dy);
10709                  {                if (row)
10710                    if (PT >= MATRIX_ROW_START_CHARPOS (row)                  set_cursor_from_row (w, row, w->current_matrix, 0, 0,
10711                        && PT < MATRIX_ROW_END_CHARPOS (row))                                       dy, nrows_scrolled);
10712                      {                else
                       set_cursor_from_row (w, row, w->current_matrix, 0, 0,  
                                            dy, nrows_scrolled);  
                       break;  
                     }  
                     
                   if (MATRIX_ROW_BOTTOM_Y (row) + dy >= it.last_visible_y)  
                     break;  
                     
                   ++row;  
                 }  
                 
               /* Give up if point was not found.  This shouldn't  
                  happen often; not more often than with try_window  
                  itself.  */  
               if (w->cursor.vpos < 0)  
10713                  {                  {
10714                    clear_glyph_matrix (w->desired_matrix);                    clear_glyph_matrix (w->desired_matrix);
10715                    return 0;                    return 0;
# Line 11200  sync_frame_with_window_matrix_rows (w) Line 11185  sync_frame_with_window_matrix_rows (w)
11185     containing CHARPOS or null.  */     containing CHARPOS or null.  */
11186    
11187  struct glyph_row *  struct glyph_row *
11188  row_containing_pos (w, charpos, start, end)  row_containing_pos (w, charpos, start, end, dy)
11189       struct window *w;       struct window *w;
11190       int charpos;       int charpos;
11191       struct glyph_row *start, *end;       struct glyph_row *start, *end;
11192         int dy;
11193  {  {
11194    struct glyph_row *row = start;    struct glyph_row *row = start;
11195    int last_y;    int last_y;
# Line 11215  row_containing_pos (w, charpos, start, e Line 11201  row_containing_pos (w, charpos, start, e
11201    if ((end && row >= end) || !row->enabled_p)    if ((end && row >= end) || !row->enabled_p)
11202      return NULL;      return NULL;
11203        
11204    last_y = window_text_bottom_y (w);    last_y = window_text_bottom_y (w) - dy;
11205                
11206    while ((end == NULL || row < end)    while ((end == NULL || row < end)
11207             && MATRIX_ROW_BOTTOM_Y (row) < last_y
11208           && (MATRIX_ROW_END_CHARPOS (row) < charpos           && (MATRIX_ROW_END_CHARPOS (row) < charpos
              /* The end position of a row equals the start  
                 position of the next row.  If CHARPOS is there, we  
                 would rather display it in the next line, except  
                 when this line ends in ZV.  */  
11209               || (MATRIX_ROW_END_CHARPOS (row) == charpos               || (MATRIX_ROW_END_CHARPOS (row) == charpos
11210                   && (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)                   /* The end position of a row equals the start
11211                       || !row->ends_at_zv_p)))                      position of the next row.  If CHARPOS is there, we
11212           && MATRIX_ROW_BOTTOM_Y (row) < last_y)                      would rather display it in the next line, except
11213                        when this line ends in ZV.  */
11214                     && !row->ends_at_zv_p
11215                     && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row))))
11216      ++row;      ++row;
11217                
11218    /* Give up if CHARPOS not found.  */    /* Give up if CHARPOS not found.  */
# Line 11435  try_window_id (w) Line 11421  try_window_id (w)
11421              }              }
11422                
11423            /* Set the cursor.  */            /* Set the cursor.  */
11424            row = row_containing_pos (w, PT, r0, NULL);            row = row_containing_pos (w, PT, r0, NULL, 0);
11425            set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);            set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
11426            return 1;            return 1;
11427          }          }
# Line 11473  try_window_id (w) Line 11459  try_window_id (w)
11459              = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);              = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
11460    
11461            /* Set the cursor.  */            /* Set the cursor.  */
11462            row = row_containing_pos (w, PT, r0, NULL);            row = row_containing_pos (w, PT, r0, NULL, 0);
11463            set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);            set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
11464            return 2;            return 2;
11465          }          }
# Line 11672  try_window_id (w) Line 11658  try_window_id (w)
11658          {          {
11659            row = row_containing_pos (w, PT,            row = row_containing_pos (w, PT,
11660                                      MATRIX_FIRST_TEXT_ROW (w->current_matrix),                                      MATRIX_FIRST_TEXT_ROW (w->current_matrix),
11661                                      last_unchanged_at_beg_row + 1);                                      last_unchanged_at_beg_row + 1, 0);
11662            if (row)            if (row)
11663              set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);              set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
11664          }          }
# Line 11681  try_window_id (w) Line 11667  try_window_id (w)
11667        else if (first_unchanged_at_end_row)        else if (first_unchanged_at_end_row)
11668          {          {
11669            row = row_containing_pos (w, PT - delta,            row = row_containing_pos (w, PT - delta,
11670                                      first_unchanged_at_end_row, NULL);                                      first_unchanged_at_end_row, NULL, 0);
11671            if (row)            if (row)
11672              set_cursor_from_row (w, row, w->current_matrix, delta,              set_cursor_from_row (w, row, w->current_matrix, delta,
11673                                   delta_bytes, dy, dvpos);                                   delta_bytes, dy, dvpos);
# Line 12945  display_line (it) Line 12931  display_line (it)
12931                        it->max_phys_ascent = phys_ascent;                        it->max_phys_ascent = phys_ascent;
12932                        it->max_phys_descent = phys_descent;                        it->max_phys_descent = phys_descent;
12933                      }                      }
12934                      else if (it->c == '\t' && FRAME_WINDOW_P (it->f))
12935                        {
12936                          /* A TAB that extends past the right edge of the
12937                             window.  This produces a single glyph on
12938                             window system frames.  We leave the glyph in
12939                             this row and let it fill the row, but don't
12940                             consume the TAB.  */
12941                          it->continuation_lines_width += it->last_visible_x;
12942                          row->ends_in_middle_of_char_p = 1;
12943                          row->continued_p = 1;
12944                          glyph->pixel_width = it->last_visible_x - x;
12945                          it->starts_in_middle_of_char_p = 1;
12946                        }
12947                    else                    else
12948                      {                      {
12949                        /* Display element draws past the right edge of                        /* Something other than a TAB that draws past
12950                           the window.  Restore positions to values                           the right edge of the window.  Restore
12951                           before the element.  */                           positions to values before the element.  */
12952                        row->used[TEXT_AREA] = n_glyphs_before + i;                        row->used[TEXT_AREA] = n_glyphs_before + i;
12953                                        
12954                        /* Display continuation glyphs.  */                        /* Display continuation glyphs.  */
# Line 12957  display_line (it) Line 12956  display_line (it)
12956                          produce_special_glyphs (it, IT_CONTINUATION);                          produce_special_glyphs (it, IT_CONTINUATION);
12957                        row->continued_p = 1;                        row->continued_p = 1;
12958    
12959                        /* A TAB takes us to the right edge of the window.  */                        it->continuation_lines_width += x;
                       if (it->c == '\t')  
                         {  
                           it->continuation_lines_width += it->last_visible_x;  
                           row->ends_in_middle_of_char_p = 1;  
                         }  
                       else  
                         it->continuation_lines_width += x;  
12960                                                
12961                        if (nglyphs > 1 && i > 0)                        if (nglyphs > 1 && i > 0)
12962                          {                          {

Legend:
Removed from v.1.691  
changed lines
  Added in v.1.692

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