aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch
new file mode 100644
index 000000000000..0a2c52722268
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch
@@ -0,0 +1,29 @@
+--- a/src/vte/vteterminal.h
++++ b/src/vte/vteterminal.h
+@@ -204,7 +204,9 @@
+ _VTE_PUBLIC
+ void vte_terminal_select_text(VteTerminal *terminal, long start_col, long start_row,
+ long end_col, long end_row) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
+-
++_VTE_PUBLIC
++char *
++vte_terminal_get_selection(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
+
+ /* By-word selection */
+ _VTE_PUBLIC
+--- a/src/vtegtk.cc
++++ b/src/vtegtk.cc
+@@ -2435,6 +2435,13 @@
+ IMPL(terminal)->select_text(start_col, start_row, end_col, end_row);
+ }
+
++char *
++vte_terminal_get_selection(VteTerminal *terminal) noexcept
++{
++ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL);
++ return g_strdup (IMPL(terminal)->m_selection[VTE_SELECTION_PRIMARY]->str);
++}
++
+ /**
+ * vte_terminal_get_cursor_position:
+ * @terminal: a #VteTerminal