because this is the only last cursor data we need to keep and consult.
* window.c (replace_window, set_window_buffer, Fsplit_window_internal):
* xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
Adjust users.
+2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * window.h (struct window): Replace last_cursor with last_cursor_vpos
+ because this is the only last cursor data we need to keep and consult.
+ * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
+ * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
+ Adjust users.
+
2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
Fix recovering from possible decompression error. Since
n->desired_matrix = n->current_matrix = 0;
n->vscroll = 0;
memset (&n->cursor, 0, sizeof (n->cursor));
- memset (&n->last_cursor, 0, sizeof (n->last_cursor));
memset (&n->phys_cursor, 0, sizeof (n->phys_cursor));
+ n->last_cursor_vpos = 0;
n->phys_cursor_type = -1;
n->phys_cursor_width = -1;
n->must_be_updated_p = 0;
w->window_end_pos = 0;
w->window_end_vpos = 0;
- memset (&w->last_cursor, 0, sizeof w->last_cursor);
+ w->last_cursor_vpos = 0;
if (!(keep_margins_p && samebuf))
{ /* If we're not actually changing the buffer, don't reset hscroll and
}
n->window_end_valid = 0;
- memset (&n->last_cursor, 0, sizeof n->last_cursor);
+ n->last_cursor_vpos = 0;
/* Get special geometry settings from reference window. */
n->left_margin_cols = r->left_margin_cols;
as the normal may yield a matrix which is too small. */
int nrows_scale_factor, ncols_scale_factor;
- /* Cursor position as of last update that completed without
- pause. This is the position of last_point. */
- struct cursor_pos last_cursor;
-
/* Intended cursor position. This is a position within the
glyph matrix. */
struct cursor_pos cursor;
/* Where the cursor actually is. */
struct cursor_pos phys_cursor;
+ /* Vertical cursor position as of last update that completed
+ without pause. This is the position of last_point. */
+ int last_cursor_vpos;
+
/* Cursor type and width of last cursor drawn on the window.
Used for X and w32 frames; -1 initially. */
int phys_cursor_type, phys_cursor_width;
w->current_matrix->begv = BUF_BEGV (b);
w->current_matrix->zv = BUF_ZV (b);
- w->last_cursor = w->cursor;
+ w->last_cursor_vpos = w->cursor.vpos;
w->last_cursor_off_p = w->cursor_off_p;
if (w == XWINDOW (selected_window))
/* Start with the row the cursor was displayed during the last
not paused redisplay. Give up if that row is not valid. */
- if (w->last_cursor.vpos < 0
- || w->last_cursor.vpos >= w->current_matrix->nrows)
+ if (w->last_cursor_vpos < 0
+ || w->last_cursor_vpos >= w->current_matrix->nrows)
rc = CURSOR_MOVEMENT_MUST_SCROLL;
else
{
- row = MATRIX_ROW (w->current_matrix, w->last_cursor.vpos);
+ row = MATRIX_ROW (w->current_matrix, w->last_cursor_vpos);
if (row->mode_line_p)
++row;
if (!row->enabled_p)