[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114003: * window.h (struct window): Replace last_cu
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r114003: * window.h (struct window): Replace last_cursor with last_cursor_vpos |
Date: |
Mon, 26 Aug 2013 09:34:18 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114003
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2013-08-26 13:33:37 +0400
message:
* 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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/window.c window.c-20091113204419-o5vbwnq5f7feedwu-231
src/window.h window.h-20091113204419-o5vbwnq5f7feedwu-271
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-08-26 05:32:47 +0000
+++ b/src/ChangeLog 2013-08-26 09:33:37 +0000
@@ -1,5 +1,13 @@
2013-08-26 Dmitry Antipov <address@hidden>
+ * 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 <address@hidden>
+
Fix recovering from possible decompression error. Since
insert_from_gap doesn't always move point, we can't use PT as
the position where the partially decompressed data ends, and
=== modified file 'src/window.c'
--- a/src/window.c 2013-08-23 04:17:04 +0000
+++ b/src/window.c 2013-08-26 09:33:37 +0000
@@ -2027,8 +2027,8 @@
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;
@@ -3172,7 +3172,7 @@
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
@@ -3911,7 +3911,7 @@
}
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;
=== modified file 'src/window.h'
--- a/src/window.h 2013-08-14 07:05:54 +0000
+++ b/src/window.h 2013-08-26 09:33:37 +0000
@@ -229,10 +229,6 @@
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;
@@ -240,6 +236,10 @@
/* 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;
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2013-08-26 05:20:59 +0000
+++ b/src/xdisp.c 2013-08-26 09:33:37 +0000
@@ -13743,7 +13743,7 @@
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))
@@ -15087,12 +15087,12 @@
/* 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114003: * window.h (struct window): Replace last_cursor with last_cursor_vpos,
Dmitry Antipov <=