* BufferView_pimpl.C (getCurrentChange): do not assume that

LyXText at cursor position is the same as LyXText at
	cursor.selBegin() position. Fixes a crash (bug 2600).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@14935 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-09-08 12:16:35 +00:00
parent 9c4a1c3756
commit 817d7c5fb3
3 changed files with 11 additions and 9 deletions

View File

@ -749,17 +749,11 @@ bool BufferView::Pimpl::available() const
Change const BufferView::Pimpl::getCurrentChange()
{
if (!buffer_->params().tracking_changes)
if (!buffer_->params().tracking_changes || !cursor_.selection())
return Change(Change::UNCHANGED);
LyXText * text = bv_->getLyXText();
LCursor & cur = cursor_;
if (!cur.selection())
return Change(Change::UNCHANGED);
return text->getPar(cur.selBegin().pit()).
lookupChangeFull(cur.selBegin().pos());
DocIterator dit = cursor_.selectionBegin();
return dit.paragraph().lookupChangeFull(dit.pos());
}

View File

@ -1,3 +1,9 @@
2006-09-08 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView_pimpl.C (getCurrentChange): do not assume that
LyXText at cursor position is the same as LyXText at
cursor.selBegin() position. Fixes a crash (bug 2600).
2006-08-19 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView_pimpl.C (focusChange): new method; updates the

View File

@ -79,6 +79,8 @@ What's new
- Fix lockup when accepting a change in a text inset (bug 2510).
- Fix a crash with change tracking in tables (bug 2600).
- Fix a crash when undoing super/subscript deletion (bug 2727).
- Fix a crash when the cursor is in an empty script and the user