if (!selection.set() && cursorPar()->size())
return;
- if (selection.start.par() == selection.end.par()) {
- LyXCursor & startc = selection.start;
- LyXCursor & endc = selection.end;
+ if (selStart().par() == selEnd().par()) {
+ LyXCursor const & startc = selStart();
+ LyXCursor const & endc = selEnd();
recordUndo(Undo::INSERT, this, startc.par());
getPar(startc)->acceptChange(startc.pos(), endc.pos());
finishUndo();
if (!selection.set() && cursorPar()->size())
return;
- if (selection.start.par() == selection.end.par()) {
- LyXCursor & startc = selection.start;
- LyXCursor & endc = selection.end;
+ if (selStart().par() == selEnd().par()) {
+ LyXCursor const & startc = selStart();
+ LyXCursor const & endc = selEnd();
recordUndo(Undo::INSERT, this, startc.par());
getPar(startc)->rejectChange(startc.pos(), endc.pos());
finishUndo();
cursorRight(bv());
} else {
LyXCursor tmpcursor = cursor;
- // We can't store the row over a regular setCursor
- // so we set it to 0 and reset it afterwards.
selection.set(true); // to avoid deletion
cursorEnd();
setCursor(tmpcursor, tmpcursor.par(), tmpcursor.pos());
LyXCursor to;
if (selection.set()) {
- from = selection.start;
- to = selection.end;
+ from = selStart();
+ to = selEnd();
} else {
from = cursor;
getWord(from, to, lyx::PARTIAL_WORD);
return string();
// should be const ...
- ParagraphList::iterator startpit = getPar(selection.start);
- ParagraphList::iterator endpit = getPar(selection.end);
- size_t const startpos = selection.start.pos();
- size_t const endpos = selection.end.pos();
+ ParagraphList::iterator startpit = getPar(selStart());
+ ParagraphList::iterator endpit = getPar(selEnd());
+ size_t const startpos = selStart().pos();
+ size_t const endpos = selEnd().pos();
if (startpit == endpit)
return startpit->asString(buffer, startpos, endpos, label);