+
+ collapsed_ = true;
+ bv->updateInset(const_cast<InsetCollapsable *>(this), true);
+}
+
+
+void InsetCollapsable::setLabel(string const & l) const
+{
+ label = l;
+}
+
+
+bool InsetCollapsable::searchForward(BufferView * bv, string const & str,
+ bool const & cs, bool const & mw)
+{
+ bool found = inset.searchForward(bv, str, cs, mw);
+ if (first_after_edit && !found)
+ close(bv);
+ first_after_edit = false;
+ return found;
+}
+bool InsetCollapsable::searchBackward(BufferView * bv, string const & str,
+ bool const & cs, bool const & mw)
+{
+ bool found = inset.searchBackward(bv, str, cs, mw);
+ if (first_after_edit && !found)
+ close(bv);
+ first_after_edit = false;
+ return found;
+}
+
+
+string const InsetCollapsable::selectNextWord(BufferView * bv, float & value) const
+{
+ string str = inset.selectNextWord(bv, value);
+ if (first_after_edit && str.empty())
+ close(bv);
+ first_after_edit = false;
+ return str;