summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-12-02 13:54:42 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-12-02 13:54:42 +0000
commited8607b74bb6d53b844ab740422b3aef89e2f915 (patch)
tree1b49c70b03bb5dc48926b7863104ee31e2144ff3
parentdf9641608756c1ca56deda15ae968400652728d5 (diff)
downloadvte-ed8607b74bb6d53b844ab740422b3aef89e2f915.tar.gz
Add a shortcircuit check.
2008-12-02 Behdad Esfahbod <behdad@gnome.org> * src/vte.c (vte_terminal_extend_selection): Add a shortcircuit check. svn path=/trunk/; revision=2300
-rw-r--r--ChangeLog5
-rw-r--r--src/vte.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ae23773..7e4670e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2008-12-02 Behdad Esfahbod <behdad@gnome.org>
+ * src/vte.c (vte_terminal_extend_selection): Add a shortcircuit
+ check.
+
+2008-12-02 Behdad Esfahbod <behdad@gnome.org>
+
* src/vte-private.h:
* src/vte.c (vte_terminal_send_mouse_button_internal),
(vte_terminal_maybe_send_mouse_drag), (cursor_inside_match),
diff --git a/src/vte.c b/src/vte.c
index 616e478b..8fe26864 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -6274,6 +6274,10 @@ vte_terminal_extend_selection(VteTerminal *terminal, long x, long y,
gboolean invalidate_selected = FALSE;
gboolean had_selection;
+ if (G_UNLIKELY (x == terminal->pvt->mouse_last_x &&
+ y == terminal->pvt->mouse_last_y))
+ return;
+
height = terminal->char_height;
width = terminal->char_width;