X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText3.cpp;h=80f782d8057101f000534312a2ac6f9c3c7deb9b;hb=6c977615633e5e132494b9a7fa778588210f9c95;hp=ca96a4e648baa514b97b157fa5391517e2d71c05;hpb=a01cb111a07717a337c18860216359cdbe22af3c;p=lyx.git diff --git a/src/Text3.cpp b/src/Text3.cpp index ca96a4e648..80f782d805 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1090,14 +1090,9 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) else c = par.getChar(pos - 1); string arg = to_utf8(cmd.argument()); - if (arg == "single") - cur.insert(new InsetQuotes(c, - bufparams.quotes_language, - InsetQuotes::SingleQ)); - else - cur.insert(new InsetQuotes(c, - bufparams.quotes_language, - InsetQuotes::DoubleQ)); + cur.insert(new InsetQuotes(c, bufparams.quotes_language, + (arg == "single") ? InsetQuotes::SingleQuotes + : InsetQuotes::DoubleQuotes)); cur.posForward(); } else @@ -1413,7 +1408,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) case LFUN_INDEX_PRINT: case LFUN_NOMENCL_PRINT: case LFUN_TOC_INSERT: - case LFUN_HFILL_INSERT: case LFUN_LINE_INSERT: case LFUN_NEWPAGE_INSERT: case LFUN_PAGEBREAK_INSERT: @@ -1869,6 +1863,8 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, code = NOTE_CODE; else if (cmd.argument() == "ref") code = REF_CODE; + else if (cmd.argument() == "space") + code = SPACE_CODE; else if (cmd.argument() == "toc") code = TOC_CODE; else if (cmd.argument() == "vspace") @@ -1971,7 +1967,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, // always allow this, since we will inset a raw quote // if an inset is not allowed. break; - case LFUN_HFILL_INSERT: case LFUN_SPECIALCHAR_INSERT: code = SPECIALCHAR_CODE; break;