else
needsUpdate = cursorRight(cur);
- if (!needsUpdate && oldTopSlice == cur.top() && cur.boundary() == oldBoundary) {
+ if (!needsUpdate && oldTopSlice == cur.top()
+ && cur.boundary() == oldBoundary) {
cur.undispatched();
cmd = FuncRequest(LFUN_FINISHED_RIGHT);
}
needsUpdate = cursorRight(cur);
else
needsUpdate = cursorLeft(cur);
- if (!needsUpdate && oldTopSlice == cur.top() &&
- cur.boundary() == oldBoundary)
- {
+
+ if (!needsUpdate && oldTopSlice == cur.top()
+ && cur.boundary() == oldBoundary) {
cur.undispatched();
cmd = FuncRequest(LFUN_FINISHED_LEFT);
}
update(cur);
//lyxerr << "handle LFUN_UP[SEL]:\n" << cur << endl;
cur.selHandle(cmd.action == LFUN_UPSEL);
+
needsUpdate = cursorUp(cur);
- if (!needsUpdate && oldTopSlice == cur.top() &&
- cur.boundary() == oldBoundary)
- {
+ if (!needsUpdate && oldTopSlice == cur.top()
+ && cur.boundary() == oldBoundary) {
cur.undispatched();
cmd = FuncRequest(LFUN_FINISHED_UP);
}
cur.clearSelection();
string const clip = bv->getClipboard();
if (!clip.empty()) {
+ recordUndo(cur);
if (cmd.argument == "paragraph")
insertStringAsParagraphs(cur, clip);
else
int const nargs = s1.empty() ? 0 : convert<int>(s1);
string const s2 = token(s, ' ', 2);
string const type = s2.empty() ? "newcommand" : s2;
- cur.insert(new MathMacroTemplate(token(s, ' ', 0), nargs, s2));
+ cur.insert(new MathMacroTemplate(token(s, ' ', 0), nargs, type));
//cur.nextInset()->edit(cur, true);
}
break;
cur.selection() = false;
} else {
cur.undispatched();
- cmd = FuncRequest(LFUN_FINISHED_LEFT);
+ cmd = FuncRequest(LFUN_FINISHED_RIGHT);
}
break;
default:
- lyxerr << BOOST_CURRENT_FUNCTION
- << " Not DISPATCHED by LyXText" << endl;
+ lyxerr[Debug::ACTION]
+ << BOOST_CURRENT_FUNCTION
+ << ": Command " << cmd
+ << " not DISPATCHED by LyXText" << endl;
cur.undispatched();
break;
}