On Sat, Apr 10, 2004 at 05:17:08PM +0200, Juergen Spitzmueller wrote:
> Juergen Spitzmueller wrote:
> > - create a new document
> > - insert a collapsable (e.g. ert)
> > - move the cursor before the inset
> > - press backspace
> 
> I think I see what's going on. The crash only happens if you hit backspace 
> when the cursor is in front of an *opened* collapsable (a closed collapsable 
> gets deleted, as it should be).
> Now LyXText::Delete basically just moves the cursor to the right and calls 
> LyXText::backspace. That is, if the collapsable is opened, the cursor gets 
> moved *inside* the collapsable. That triggers BOOST_ASSERT(this == 
> cur.text()) in LyXText::backspace.

Good analysis.

> I guess the collapsable should be closed 
> before cursorRight or the cursor should just jump across the inset.

Wrong conclusion. We should just delete the thing instead moving the
cursor around :-)

Andre'

Reply via email to