View | Details | Raw Unified | Return to bug 209166
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	vte
4
PORTNAME=	vte
5
PORTVERSION=	0.28.2
5
PORTVERSION=	0.28.2
6
PORTREVISION?=	2
6
PORTREVISION?=	3
7
CATEGORIES=	x11-toolkits gnome
7
CATEGORIES=	x11-toolkits gnome
8
MASTER_SITES=	GNOME
8
MASTER_SITES=	GNOME
9
DIST_SUBDIR=	gnome2
9
DIST_SUBDIR=	gnome2
(-)files/patch-src_vte.c (-3 / +66 lines)
Lines 1-6 Link Here
1
--- src/vte.c.orig	2011-08-28 23:31:45.000000000 +0200
1
--- src/vte.c-	2016-04-06 12:07:45.469197782 +0900
2
+++ src/vte.c	2014-02-11 21:57:19.000000000 +0100
2
+++ src/vte.c	2016-04-06 12:08:02.702194923 +0900
3
@@ -5164,19 +5164,23 @@
3
@@ -4057,6 +4057,7 @@
4
 	long wcount, start, delta;
5
 	gboolean leftovers, modified, bottom, again;
6
 	gboolean invalidated_text;
7
+	gboolean in_scroll_region;
8
 	GArray *unichars;
9
 	struct _vte_incoming_chunk *chunk, *next_chunk, *achunk = NULL;
10
 
11
@@ -4076,6 +4077,10 @@
12
 	cursor = screen->cursor_current;
13
 	cursor_visible = terminal->pvt->cursor_visible;
14
 
15
+	in_scroll_region = screen->scrolling_restricted
16
+	    && (screen->cursor_current.row >= (screen->insert_delta + screen->scrolling_region.start))
17
+	    && (screen->cursor_current.row <= (screen->insert_delta + screen->scrolling_region.end));
18
+
19
 	/* We should only be called when there's data to process. */
20
 	g_assert(terminal->pvt->incoming ||
21
 		 (terminal->pvt->pending->len > 0));
22
@@ -4174,6 +4179,8 @@
23
 		 * points to the first character which isn't part of this
24
 		 * sequence. */
25
 		if ((match != NULL) && (match[0] != '\0')) {
26
+			gboolean new_in_scroll_region;
27
+
28
 			/* Call the right sequence handler for the requested
29
 			 * behavior. */
30
 			_vte_terminal_handle_sequence(terminal,
31
@@ -4184,12 +4191,20 @@
32
 			start = (next - wbuf);
33
 			modified = TRUE;
34
 
35
-			/* if we have moved during the sequence handler, restart the bbox */
36
+			new_in_scroll_region = screen->scrolling_restricted
37
+			    && (screen->cursor_current.row >= (screen->insert_delta + screen->scrolling_region.start))
38
+			    && (screen->cursor_current.row <= (screen->insert_delta + screen->scrolling_region.end));
39
+
40
+			delta = screen->scroll_delta;	/* delta may have changed from sequence. */
41
+
42
+			/* if we have moved greatly during the sequence handler, or moved into a scroll_region
43
+                         * from outside it, restart the bbox */
44
 			if (invalidated_text &&
45
-					(screen->cursor_current.col > bbox_bottomright.x + VTE_CELL_BBOX_SLACK ||
46
-					 screen->cursor_current.col < bbox_topleft.x - VTE_CELL_BBOX_SLACK     ||
47
-					 screen->cursor_current.row > bbox_bottomright.y + VTE_CELL_BBOX_SLACK ||
48
-					 screen->cursor_current.row < bbox_topleft.y - VTE_CELL_BBOX_SLACK)) {
49
+					((new_in_scroll_region && !in_scroll_region) ||
50
+					 (screen->cursor_current.col > bbox_bottomright.x + VTE_CELL_BBOX_SLACK ||
51
+					  screen->cursor_current.col < bbox_topleft.x - VTE_CELL_BBOX_SLACK     ||
52
+					  screen->cursor_current.row > bbox_bottomright.y + VTE_CELL_BBOX_SLACK ||
53
+					  screen->cursor_current.row < bbox_topleft.y - VTE_CELL_BBOX_SLACK))) {
54
 				/* Clip off any part of the box which isn't already on-screen. */
55
 				bbox_topleft.x = MAX(bbox_topleft.x, 0);
56
 				bbox_topleft.y = MAX(bbox_topleft.y, delta);
57
@@ -4209,6 +4224,8 @@
58
 				bbox_bottomright.x = bbox_bottomright.y = -G_MAXINT;
59
 				bbox_topleft.x = bbox_topleft.y = G_MAXINT;
60
 			}
61
+
62
+			in_scroll_region = new_in_scroll_region;
63
 		} else
64
 		/* Second, we have a NULL match, and next points to the very
65
 		 * next character in the buffer.  Insert the character which
66
@@ -5164,19 +5181,23 @@
4
 vte_terminal_read_modifiers (VteTerminal *terminal,
67
 vte_terminal_read_modifiers (VteTerminal *terminal,
5
 			     GdkEvent *event)
68
 			     GdkEvent *event)
6
 {
69
 {

Return to bug 209166