ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=05f6cd3eac0641095ae81cc106aca92861d44d4d

commit 05f6cd3eac0641095ae81cc106aca92861d44d4d
Author: Andy Williams <a...@andywilliams.me>
Date:   Sat May 30 10:13:11 2015 +0100

    editor: trigger saves if selection cut or pasted
---
 elm_code/src/lib/widget/elm_code_widget.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/elm_code/src/lib/widget/elm_code_widget.c 
b/elm_code/src/lib/widget/elm_code_widget.c
index 7ae845c..8e98cef 100644
--- a/elm_code/src/lib/widget/elm_code_widget.c
+++ b/elm_code/src/lib/widget/elm_code_widget.c
@@ -1124,11 +1124,19 @@ _elm_code_widget_control_key_down_cb(Elm_Code_Widget 
*widget, const char *key)
      return;
 
    if (!strcmp("c", key))
-     elm_code_widget_selection_copy(widget);
-   else if (!strcmp("v", key))
+     {
+        elm_code_widget_selection_copy(widget);
+        return;
+     }
+
+   if (!strcmp("v", key))
      elm_code_widget_selection_paste(widget);
    else if (!strcmp("x", key))
      elm_code_widget_selection_cut(widget);
+
+   eo_do(widget,
+// TODO construct and pass a change object
+         eo_event_callback_call(ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL));
 }
 
 static void

-- 


Reply via email to