termite/expose_select_text.patch

77 lines
2.9 KiB
Diff

diff -aur vte-0.32.2-old/src/vteaccess.c vte-0.32.2/src/vteaccess.c
--- vte-0.32.2-old/src/vteaccess.c 2012-07-06 22:23:20.937715584 -0400
+++ vte-0.32.2/src/vteaccess.c 2012-07-06 22:23:26.521119667 -0400
@@ -1666,7 +1666,7 @@
VTE_TERMINAL_ACCESSIBLE_PRIVATE_DATA);
xy_from_offset (priv, start_offset, &start_x, &start_y);
xy_from_offset (priv, end_offset, &end_x, &end_y);
- _vte_terminal_select_text (terminal, start_x, start_y, end_x, end_y, start_offset, end_offset);
+ vte_terminal_select_text (terminal, start_x, start_y, end_x, end_y, start_offset, end_offset);
return TRUE;
}
diff -aur vte-0.32.2-old/src/vte.c vte-0.32.2/src/vte.c
--- vte-0.32.2-old/src/vte.c 2012-07-06 22:23:20.934382208 -0400
+++ vte-0.32.2/src/vte.c 2012-07-06 22:31:02.140287012 -0400
@@ -14568,7 +14568,7 @@
}
void
-_vte_terminal_select_text(VteTerminal *terminal,
+vte_terminal_select_text(VteTerminal *terminal,
long start_col, long start_row,
long end_col, long end_row,
int start_offset, int end_offset)
@@ -14593,6 +14593,16 @@
}
+gboolean
+vte_terminal_get_selection_block_mode(VteTerminal *terminal) {
+ return terminal->pvt->selection_block_mode;
+}
+
+void
+vte_terminal_set_selection_block_mode(VteTerminal *terminal, gboolean block_mode) {
+ return terminal->pvt->selection_block_mode = block_mode;
+}
+
void
_vte_terminal_remove_selection(VteTerminal *terminal)
{
@@ -14603,7 +14613,7 @@
_vte_terminal_select_empty_at(VteTerminal *terminal,
long col, long row)
{
- _vte_terminal_select_text(terminal, col, row, col - 1, row, 0, 0);
+ vte_terminal_select_text(terminal, col, row, col - 1, row, 0, 0);
}
static void
@@ -15293,7 +15303,7 @@
g_free (row_text);
g_match_info_free (match_info);
- _vte_terminal_select_text (terminal, start_col, start_row, end_col, end_row, 0, 0);
+ vte_terminal_select_text (terminal, start_col, start_row, end_col, end_row, 0, 0);
/* Quite possibly the math here should not access adjustment directly... */
value = gtk_adjustment_get_value(terminal->adjustment);
page_size = gtk_adjustment_get_page_size(terminal->adjustment);
Only in vte-0.32.2/src: vte.gresource.xml
diff -aur vte-0.32.2-old/src/vte.h vte-0.32.2/src/vte.h
--- vte-0.32.2-old/src/vte.h 2012-07-06 22:23:20.934382208 -0400
+++ vte-0.32.2/src/vte.h 2012-07-06 22:28:20.071533871 -0400
@@ -296,6 +296,12 @@
/* simple manipulation of selection */
void vte_terminal_select_all(VteTerminal *terminal);
void vte_terminal_select_none(VteTerminal *terminal);
+void vte_terminal_select_text(VteTerminal *terminal,
+ long start_col, long start_row,
+ long end_col, long end_row,
+ int start_offset, int end_offset);
+gboolean vte_terminal_get_selection_block_mode(VteTerminal *terminal);
+void vte_terminal_set_selection_block_mode(VteTerminal *terminal, gboolean block_mode);
/* Set the terminal's size. */
void vte_terminal_set_size(VteTerminal *terminal,