mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
* enter new macro template and select the name. This save a lot of keystrokes to remoe the long default name.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26315 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
849b405c73
commit
8314b93c04
@ -1481,8 +1481,16 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
MacroType type = MacroTypeNewcommand;
|
MacroType type = MacroTypeNewcommand;
|
||||||
if (s2 == "def")
|
if (s2 == "def")
|
||||||
type = MacroTypeDef;
|
type = MacroTypeDef;
|
||||||
cur.insert(new MathMacroTemplate(from_utf8(token(s, ' ', 0)), nargs, false, type));
|
MathMacroTemplate * inset = new MathMacroTemplate(from_utf8(token(s, ' ', 0)), nargs, false, type);
|
||||||
//cur.nextInset()->edit(cur, true);
|
inset->setBuffer(bv->buffer());
|
||||||
|
insertInset(cur, inset);
|
||||||
|
|
||||||
|
// enter macro inset and select the name
|
||||||
|
cur.push(*inset);
|
||||||
|
cur.top().pos() = cur.top().lastpos();
|
||||||
|
cur.resetAnchor();
|
||||||
|
cur.selection() = true;
|
||||||
|
cur.top().pos() = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user