summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-18 12:35:26 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-01-18 12:35:26 -0500
commitec910c5bb9dd23e266845a7dfcc7c9a8dcada1c8 (patch)
tree19850b85c70dd0c2ae11047e352b12cce259966b
parent965cb9d28d183253eaa85e1764727ad40a5d0fe7 (diff)
downloadefl-ec910c5bb9dd23e266845a7dfcc7c9a8dcada1c8.tar.gz
elm_code: Don't update selection if it didn't change
Summary: Mouse motion can cause multiple worthless selection updates with no change to row or column. Discard updates that don't really update. ref T6209 Depends on D7692 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T6209 Differential Revision: https://phab.enlightenment.org/D7693
-rw-r--r--src/lib/elementary/elm_code_widget_selection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_widget_selection.c b/src/lib/elementary/elm_code_widget_selection.c
index 31476ca4ad..59a5615bd4 100644
--- a/src/lib/elementary/elm_code_widget_selection.c
+++ b/src/lib/elementary/elm_code_widget_selection.c
@@ -74,6 +74,9 @@ elm_code_widget_selection_end(Evas_Object *widget,
pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
+ if (pd->selection && (pd->selection->end_line == line) &&
+ (pd->selection->end_col == col)) return;
+
_elm_code_widget_selection_limit(widget, pd, &line, &col);
if (!pd->selection)
{