[vte/vte-next: 221/223] Store the screen in the VteBufferIter too
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 221/223] Store the screen in the VteBufferIter too
- Date: Wed, 22 Jun 2011 21:07:09 +0000 (UTC)
commit 5a421df1d117f5ed5b2de40f2ae4c0b88643451e
Author: Christian Persch <chpe gnome org>
Date: Wed Jun 22 21:47:27 2011 +0200
Store the screen in the VteBufferIter too
src/vte-private.h | 1 +
src/vte.c | 4 ++++
src/vtebuffer.h | 5 ++---
3 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index e4ef164..a85ac7f 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -151,6 +151,7 @@ typedef struct _VteBufferIterReal VteBufferIterReal;
struct _VteBufferIterReal {
VteVisualPosition position;
VteBuffer *buffer;
+ VteScreen *screen;
};
G_STATIC_ASSERT(sizeof(VteBufferIterReal) <= sizeof(VteBufferIter));
diff --git a/src/vte.c b/src/vte.c
index f9a918c..574e07c 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -13559,6 +13559,9 @@ vte_view_iter_is_visible(VteView *view,
if (vte_buffer_iter_is_valid(iter, buffer))
return FALSE;
+ if (real_iter->screen != buffer->pvt->screen)
+ return FALSE;
+
row = real_iter->position.row - buffer->pvt->screen->scroll_delta;
return row >= 0 && row < buffer->pvt->row_count;
@@ -14465,6 +14468,7 @@ _vte_buffer_iter_init(VteBufferIterReal *real_iter,
g_return_if_fail(real_iter != NULL);
real_iter->buffer = buffer;
+ real_iter->screen = buffer->pvt->screen;
memset(&real_iter->position, 0, sizeof(real_iter->position));
}
diff --git a/src/vtebuffer.h b/src/vtebuffer.h
index 98cb82d..12e4b2e 100644
--- a/src/vtebuffer.h
+++ b/src/vtebuffer.h
@@ -39,9 +39,8 @@ typedef struct _VteBufferIter VteBufferIter;
* FIXMEchpe
*/
struct _VteBufferIter {
- glong dummy1;
- glong dummy2;
- gpointer dummy3;
+ glong dummy0[2];
+ gpointer dummy1[2];
};
/* VteBuffer object */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]