elm_code: Don't update selection if it didn't change
authorDerek Foreman <derek.foreman.samsung@gmail.com>
Fri, 18 Jan 2019 17:35:26 +0000 (12:35 -0500)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 24 Jan 2019 05:20:18 +0000 (14:20 +0900)
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

src/lib/elementary/elm_code_widget_selection.c

index 31476ca..59a5615 100644 (file)
@@ -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)
      {