// Try implicit word selection
// If there is a change in the language the implicit word selection
// is disabled.
LyXCursor const reset_cursor = cursor;
bool const implicitSelection = selectWordWhenUnderCursor(bview, PREVIOUS_WORD);
// Try implicit word selection
// If there is a change in the language the implicit word selection
// is disabled.
LyXCursor const reset_cursor = cursor;
bool const implicitSelection = selectWordWhenUnderCursor(bview, PREVIOUS_WORD);
- idxstring = selectionAsString(bview->buffer(), false);
+ // Reset cursors to their original position.
+ cursor = reset_cursor;
+ setCursor(bview, cursor.par(), cursor.pos());
+ selection.cursor = cursor;
- setLayout(bview, copylayouttype);
+ // do nothing if there has been no previous copyEnvironmentType()
+ if (!copylayouttype.empty())
+ setLayout(bview, copylayouttype);
-// sets the selection over the number of characters of string, no check!!
-void LyXText::setSelectionOverString(BufferView * bview, string const & str)
+void LyXText::setSelectionRange(BufferView * bview, lyx::pos_type length)