Fix bits completion
Completion iterator wasn't saved in bits completion. Ideally I would use
createSetSuggestions for bit completion, but unfortunately, yang::Enum
and yang::IdentityRef have a container with values that have a
".m_value" member and yang::Bits directly has a container of std::string
(which doesn't have .m_value). So Bits and the other two aren't
compatible.
Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/204
Change-Id: Ib2d1162270917d9c4d05e55fbb62c285c1a46aa2
diff --git a/src/leaf_data.hpp b/src/leaf_data.hpp
index 7bab723..df0f9b3 100644
--- a/src/leaf_data.hpp
+++ b/src/leaf_data.hpp
@@ -162,6 +162,7 @@
parser.add(bit, bit);
parserContext.m_suggestions.insert(Completion{bit});
}
+ parserContext.m_completionIterator = first;
std::vector<std::string> bitsRes;