///
-bool operator==(InsetCommandParams const &,
- InsetCommandParams const &);
+bool operator==(InsetCommandParams const &, InsetCommandParams const &);
///
-bool operator!=(InsetCommandParams const &,
- InsetCommandParams const &);
+bool operator!=(InsetCommandParams const &, InsetCommandParams const &);
#endif
kbmap->bind("Delete", FuncRequest(LFUN_DELETE));
kbmap->bind("BackSpace", FuncRequest(LFUN_BACKSPACE));
- // sub- and superscript -MV
- kbmap->bind("~S-underscore", FuncRequest(LFUN_SUBSCRIPT));
- kbmap->bind("~S-asciicircum", FuncRequest(LFUN_SUPERSCRIPT));
-
// kbmap->bindings to enable the use of the numeric keypad
// e.g. Num Lock set
//kbmap->bind("KP_0", FuncRequest(LFUN_SELFINSERT));
setErrorMessage(N_("This is only allowed in math mode!"));
break;
- // passthrough hat and underscore outside mathed:
- case LFUN_SUBSCRIPT:
- dispatch(FuncRequest(view(), LFUN_SELFINSERT, "_"));
- break;
-
- case LFUN_SUPERSCRIPT:
- dispatch(FuncRequest(view(), LFUN_SELFINSERT, "^"));
- break;
-
case LFUN_DIALOG_SHOW: {
string const name = func.getArg(0);
string data = trim(func.argument.substr(name.size()));
break;
}
- case LFUN_SUPERSCRIPT:
- case LFUN_SUBSCRIPT:
- {
- recordUndo(bv, Undo::ATOMIC);
- mathcursor->script(cmd.action == LFUN_SUPERSCRIPT);
- break;
- }
-
- case LFUN_MATH_DELIM:
- {
+ case LFUN_MATH_DELIM: {
//lyxerr << "formulabase::LFUN_MATH_DELIM, arg: '" << arg << "'" << endl;
string ls;
string rs = split(cmd.argument, ls, ' ');
return pos() != size();
}
+ if (c == '_') {
+ script(false);
+ return true;
+ }
+
+ if (c == '^') {
+ script(true);
+ return true;
+ }
+
if (c == '{' || c == '}' || c == '#' || c == '&' || c == '$') {
niceInsert(createMathInset(string(1, c)));
return true;