diff options
Diffstat (limited to 'src/vtegtk.cc')
-rw-r--r-- | src/vtegtk.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vtegtk.cc b/src/vtegtk.cc index 034c023b..4eb92487 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -5579,19 +5579,25 @@ catch (...) /** * vte_terminal_get_text_selected: * @terminal: a #VteTerminal + * @format: the #VteFormat to use * - * Gets the currently selected text. + * Gets the currently selected text in the format specified by @format. + * Note that currently, only %VTE_FORMAT_TEXT is supported. * - * Returns: (transfer full) (nullable): a newly allocated string containing the selected text, or %NULL if there is no selection + * Returns: (transfer full) (nullable): a newly allocated string containing the selected text, or %NULL if there is no selection or the format is not supported * * Since: 0.70 */ char* -vte_terminal_get_text_selected(VteTerminal* terminal) noexcept +vte_terminal_get_text_selected(VteTerminal* terminal, + VteFormat format) noexcept try { g_return_val_if_fail(VTE_IS_TERMINAL(terminal), nullptr); + if (format != VTE_FORMAT_TEXT) + return nullptr; + auto const selection = IMPL(terminal)->m_selection_resolved; return vte_terminal_get_text_range(terminal, selection.start_row(), |