aw-overlay/x11-libs/vte/files/vte-ng-0.40.2.a-4.patch

62 lines
2.1 KiB
Diff
Raw Normal View History

From aa07717d21bbadedfd502cb7ad4338a476240e6a Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 21 Jun 2015 09:59:37 -0400
Subject: [PATCH] add functions to get/set block selection mode
---
src/vte.c | 26 ++++++++++++++++++++++++++
src/vteterminal.h | 3 +++
2 files changed, 29 insertions(+)
diff --git a/src/vte.c b/src/vte.c
index b5c4b52..c64887b 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -7005,6 +7005,32 @@ vte_terminal_unselect_all(VteTerminal *terminal)
vte_terminal_deselect_all (terminal);
}
+/**
+ * vte_terminal_get_selection_block_mode:
+ * @terminal: a #VteTerminal
+ *
+ * Checks whether or not block selection is enabled.
+ *
+ * Returns: %TRUE if block selection is enabled, %FALSE if not
+ */
+gboolean
+vte_terminal_get_selection_block_mode(VteTerminal *terminal) {
+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
+ return terminal->pvt->selection_block_mode;
+}
+
+/**
+ * vte_terminal_set_selection_block_mode:
+ * @terminal: a #VteTerminal
+ * @block_mode: whether block selection is enabled
+ *
+ * Sets whether or not block selection is enabled.
+ */
+void
+vte_terminal_set_selection_block_mode(VteTerminal *terminal, gboolean block_mode) {
+ g_return_if_fail(VTE_IS_TERMINAL(terminal));
+ terminal->pvt->selection_block_mode = block_mode;
+}
/**
* vte_terminal_select_text:
diff --git a/src/vteterminal.h b/src/vteterminal.h
index 4b3d29f..2ad8cc6 100644
--- a/src/vteterminal.h
+++ b/src/vteterminal.h
@@ -169,6 +169,9 @@ void vte_terminal_paste_primary(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
void vte_terminal_select_all(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
void vte_terminal_unselect_all(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+gboolean vte_terminal_get_selection_block_mode(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+void vte_terminal_set_selection_block_mode(VteTerminal *terminal,
+ gboolean block_mode) _VTE_GNUC_NONNULL(1);
void vte_terminal_select_text(VteTerminal *terminal,
long start_col, long start_row,
long end_col, long end_row) _VTE_GNUC_NONNULL(1);