select one row less in some cases

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19617 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Alfredo Braunstein 2007-08-17 07:39:50 +00:00
parent e62684db34
commit 4966873264

View File

@ -68,8 +68,10 @@ std::pair<int, int> ControlViewSource::getRows() const
int begrow = view->buffer()->texrow(). int begrow = view->buffer()->texrow().
getRowFromIdPos(beg.paragraph().id(), beg.pos()); getRowFromIdPos(beg.paragraph().id(), beg.pos());
int endrow = view->buffer()->texrow(). int endrow = view->buffer()->texrow().
getRowFromIdPos(end.paragraph().id(), end.pos());
int nextendrow = view->buffer()->texrow().
getRowFromIdPos(end.paragraph().id(), end.pos() + 1); getRowFromIdPos(end.paragraph().id(), end.pos() + 1);
return std::make_pair(begrow, endrow); return std::make_pair(begrow, endrow == nextendrow ? endrow : (nextendrow - 1));
} }