diff --git a/src/ChangeLog b/src/ChangeLog index cb46f40a5d..7fb5ea2934 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-05-31 Jean-Marc Lasgouttes + + * bufferview_funcs.C (gotoInset): fix the wrap-around code to + avoid a crash (bug 1891) + 2005-05-27 Jean-Marc Lasgouttes Fix bug 1892: diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index 170ed0b80e..3135a75461 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -253,12 +253,15 @@ void gotoInset(BufferView * bv, vector const & codes, } if (!gotoNextInset(tmpcur, codes, contents)) { - if (tmpcur != doc_iterator_begin(tmpcur.inset())) { + if (bv->cursor() != doc_iterator_begin(bv->buffer()->inset())) { tmpcur.reset(tmpcur.bottom().inset()); - if (!gotoNextInset(tmpcur, codes, contents)) + if (!gotoNextInset(tmpcur, codes, contents)) { bv->cursor().message(_("No more insets")); + return; + } } else { bv->cursor().message(_("No more insets")); + return; } }