+
+void WordList::remove(docstring const & w)
+{
+ Impl::Words::iterator it = d->words_.find(w);
+ if (it != d->words_.end()) {
+ it.data()--;
+ d->words_.change_weight(it, 0);
+ // We will not erase here, but instead we just leave it
+ // in the btree with weight 0. This avoid too much
+ // reorganisation of the tree all the time.
+ //if (it.data() == 0)
+ // d->words_.erase(w);
+ }
+}
+
+} // namespace lyx