summaryrefslogtreecommitdiff
path: root/x11/vte/patches/patch-aj
diff options
context:
space:
mode:
Diffstat (limited to 'x11/vte/patches/patch-aj')
-rw-r--r--x11/vte/patches/patch-aj60
1 files changed, 60 insertions, 0 deletions
diff --git a/x11/vte/patches/patch-aj b/x11/vte/patches/patch-aj
new file mode 100644
index 00000000000..95d993d5007
--- /dev/null
+++ b/x11/vte/patches/patch-aj
@@ -0,0 +1,60 @@
+$NetBSD: patch-aj,v 1.4.2.2 2011/06/15 18:14:44 tron Exp $
+
+gnome bug #652124
+
+--- src/vteseq.c.orig 2010-08-09 11:38:44.000000000 +0000
++++ src/vteseq.c
+@@ -532,9 +532,10 @@ vte_sequence_handler_offset(VteTerminal
+
+ /* Call another function a given number of times, or once. */
+ static void
+-vte_sequence_handler_multiple(VteTerminal *terminal,
+- GValueArray *params,
+- VteTerminalSequenceHandler handler)
++vte_sequence_handler_multiple_limited(VteTerminal *terminal,
++ GValueArray *params,
++ VteTerminalSequenceHandler handler,
++ glong max)
+ {
+ long val = 1;
+ int i;
+@@ -544,13 +545,29 @@ vte_sequence_handler_multiple(VteTermina
+ value = g_value_array_get_nth(params, 0);
+ if (G_VALUE_HOLDS_LONG(value)) {
+ val = g_value_get_long(value);
+- val = MAX(val, 1); /* FIXME: vttest. */
++ val = CLAMP(val, 1, max); /* FIXME: vttest. */
+ }
+ }
+ for (i = 0; i < val; i++)
+ handler (terminal, NULL);
+ }
+
++static void
++vte_sequence_handler_multiple(VteTerminal *terminal,
++ GValueArray *params,
++ VteTerminalSequenceHandler handler)
++{
++ vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXLONG);
++}
++
++static void
++vte_sequence_handler_multiple_r(VteTerminal *terminal,
++ GValueArray *params,
++ VteTerminalSequenceHandler handler)
++{
++ vte_sequence_handler_multiple_limited(terminal, params, handler,
++ terminal->column_count - terminal->pvt->screen->cursor_current.col);
++}
+
+ /* Manipulate certain terminal attributes. */
+ static void
+@@ -1570,7 +1587,7 @@ vte_sequence_handler_ic (VteTerminal *te
+ static void
+ vte_sequence_handler_IC (VteTerminal *terminal, GValueArray *params)
+ {
+- vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_ic);
++ vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_ic);
+ }
+
+ /* Begin insert mode. */