mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
* 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/trunk@14936 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d3d994c9e7
commit
1822466e57
@ -586,17 +586,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()).
|
||||
lookupChange(cur.selBegin().pos());
|
||||
DocIterator dit = cursor_.selectionBegin();
|
||||
return dit.paragraph().lookupChange(dit.pos());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user