The attached patch 'solves' these two bugs, but it feels like a dirty fix.

The problem is that after the last backspace:

   void GuiCompleter::hideInline
calls
   void BufferView::setInlineCompletion
which compares cur with old (which is the stored pos) with
   bool samePar
which calls
   &old.innerParagraph();
which fails because we just deleted the inset corresponding to the inner slice of old.

Maybe it is not a good idea to store the DocIterator just to compare whether they are in the same par, or we could add a function like DocIterator::hasInset() ?

Can anyone say something clever ?

Vincent


Index: src/BufferView.cpp
===================================================================
--- src/BufferView.cpp  (revision 28563)
+++ src/BufferView.cpp  (working copy)
@@ -2453,6 +2453,8 @@
                return true;
        if (a.empty() || b.empty())
                return false;
+       if (a.depth() != b.depth())
+               return false;
        return &a.innerParagraph() == &b.innerParagraph();
 }
 

Reply via email to