// then the layouts
features.useLayout(layout.name());
- if (!layout.requires().empty()) {
- vector<string> req = layout.requires();
- for (vector<string>::const_iterator it = req.begin();
- it != req.end(); ++it) {
- features.require(*it);
- }
- }
// then the fonts
fontlist_.validate(features);
void Paragraph::changeCase(BufferParams const & bparams, pos_type pos,
- pos_type right, TextCase action)
+ pos_type & right, TextCase action)
{
// process sequences of modified characters; in change
// tracking mode, this approach results in much better
///
void changeCase(BufferParams const & bparams, pos_type pos,
- pos_type right, TextCase action);
+ pos_type & right, TextCase action);
/// find \param str string inside Paragraph.
/// \return true if the specified string is at the specified position
CursorSlice from;
CursorSlice to;
+ bool gotsel = false;
if (cur.selection()) {
from = cur.selBegin();
to = cur.selEnd();
+ gotsel = true;
} else {
from = cur.top();
getWord(from, to, PARTIAL_WORD);
}
// the selection may have changed due to logically-only deleted chars
- setCursor(cur, begPit, begPos);
- cur.resetAnchor();
- setCursor(cur, endPit, right);
- cur.setSelection();
+ if (gotsel) {
+ setCursor(cur, begPit, begPos);
+ cur.resetAnchor();
+ setCursor(cur, endPit, right);
+ cur.setSelection();
+ } else
+ setCursor(cur, endPit, right);
cur.checkBufferStructure();
}