[gnome-builder/wip/slaf/xml-pack: 6/11] xml-pack: fix IdeXmlPath when we are at the root



commit 3235c473d9034ec3519687d71ebed84c7d5e9982
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Sat Jun 3 12:40:56 2017 +0200

    xml-pack: fix IdeXmlPath when we are at the root

 plugins/xml-pack/ide-xml-completion-provider.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xml-pack/ide-xml-completion-provider.c b/plugins/xml-pack/ide-xml-completion-provider.c
index c862511..59d96aa 100644
--- a/plugins/xml-pack/ide-xml-completion-provider.c
+++ b/plugins/xml-pack/ide-xml-completion-provider.c
@@ -90,6 +90,9 @@ get_path (IdeXmlSymbolNode *node,
   if (current != root_node)
     g_warning ("partial path, we don't reach the root node");
 
+  if (path->nodes->len == 0)
+    ide_xml_path_prepend_node (path, root_node);
+
   return path;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]