hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=6e7e18b12bf3599c8ea31458064c6e38b62885c3

commit 6e7e18b12bf3599c8ea31458064c6e38b62885c3
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Tue Jun 23 10:21:22 2015 +0900

    auto_comp: close popup if the line is deleted.
    
    @fix.
---
 src/lib/auto_comp.c        | 8 ++++++++
 src/lib/enventor_private.h | 1 +
 src/lib/enventor_smart.c   | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/src/lib/auto_comp.c b/src/lib/auto_comp.c
index 769e9fa..9bb1471 100644
--- a/src/lib/auto_comp.c
+++ b/src/lib/auto_comp.c
@@ -695,6 +695,14 @@ autocomp_list_show(void)
 }
 
 void
+autocomp_reset(void)
+{
+   autocomp_data *ad = g_ad;
+   if (!ad) return;
+   queue_reset(ad);
+}
+
+void
 autocomp_target_set(edit_data *ed)
 {
    autocomp_data *ad = g_ad;
diff --git a/src/lib/enventor_private.h b/src/lib/enventor_private.h
index cede4fc..7ae7a97 100644
--- a/src/lib/enventor_private.h
+++ b/src/lib/enventor_private.h
@@ -82,6 +82,7 @@ void autocomp_enabled_set(Eina_Bool enabled);
 Eina_Bool autocomp_enabled_get(void);
 Eina_Bool autocomp_event_dispatch(const char *key);
 void autocomp_list_show(void);
+void autocomp_reset(void);
 
 
 /* syntax color */
diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c
index 99e83e7..6a08915 100644
--- a/src/lib/enventor_smart.c
+++ b/src/lib/enventor_smart.c
@@ -589,6 +589,8 @@ EOLIAN static void
 _enventor_object_line_delete(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd)
 {
    edit_line_delete(pd->ed);
+   //Close auto-completion popup if it's shown.
+   autocomp_reset();
 }
 
 EOLIAN static Eo *

-- 


Reply via email to