1 From 742d57ecf15e24f6a5f2133a81b6c70acc8ff03c Mon Sep 17 00:00:00 2001
2 From: Jelle van der Waa <jelle@vdwaa.nl>
3 Date: Sat, 13 Feb 2016 22:25:19 +0100
4 Subject: [PATCH] add function for setting the text selections
7 src/vte/vteterminal.h | 4 ++++
8 src/vtegtk.cc | 20 ++++++++++++++++++++
9 2 files changed, 24 insertions(+)
11 diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
12 index 9701320d..a11b4cb7 100644
13 --- a/src/vte/vteterminal.h
14 +++ b/src/vte/vteterminal.h
15 @@ -196,6 +196,10 @@ _VTE_PUBLIC
16 void vte_terminal_select_all(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
18 void vte_terminal_unselect_all(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
20 +void vte_terminal_select_text(VteTerminal *terminal, long start_col, long start_row,
21 + long end_col, long end_row) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
24 /* By-word selection */
26 diff --git a/src/vtegtk.cc b/src/vtegtk.cc
27 index bdf36eac..d9e9f2ed 100644
30 @@ -2390,6 +2390,26 @@ vte_terminal_unselect_all(VteTerminal *terminal)
31 IMPL(terminal)->deselect_all();
35 + * vte_terminal_select_text:
36 + * @terminal: a #VteTerminal
37 + * @start_col: the starting column for the selection
38 + * @start_row: the starting row for the selection
39 + * @end_col: the end column for the selection
40 + * @end_row: the end row for the selection
42 + * Sets the current selection region.
45 +vte_terminal_select_text(VteTerminal *terminal,
46 + long start_col, long start_row,
47 + long end_col, long end_row) noexcept
49 + g_return_if_fail (VTE_IS_TERMINAL (terminal));
51 + IMPL(terminal)->select_text(start_col, start_row, end_col, end_row);
55 * vte_terminal_get_cursor_position:
56 * @terminal: a #VteTerminal