static bool display_line (struct it *it, int cursor_vpos) { struct glyph_row *row = it->glyph_row; /* Clear the result glyph row and enable it. */ prepare_desired_row (it->w, row, false); row->y = it->current_y; /* Loop generating characters. The loop is left with IT on the next character to display. */ while (true) { /* Retrieve the next thing to display. Value is false if end of buffer reached. */ if (!get_next_display_element (it)) { break; } PRODUCE_GLYPHS (it); at_end_of_line: /* Is this a line end? If yes, we're also done, after making sure that a non-default face is extended up to the right margin of the window. */ if (ITERATOR_AT_END_OF_LINE_P (it)) { /* Consume the line end. This skips over invisible lines. */ set_iterator_to_next (it, true); break; } set_iterator_to_next (it, true); } /* Compute pixel dimensions of this line. */ compute_line_metrics (it); /* Prepare for the next line. This line starts horizontally at (X HPOS) = (0 0). Vertical positions are incremented. As a convenience for the caller, IT->glyph_row is set to the next row to be used. */ it->current_y += row->height; ++it->glyph_row; return MATRIX_ROW_DISPLAYS_TEXT_P (row); }