]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Add caching for the QTextLayout objects we use
[lyx.git] / src / Text3.cpp
index a7c3cd00df0b9efe8d50b9bc8ebc87957650e4ed..ac1743964cfd1b711eeb22b4a20d358368f36bcf 100644 (file)
@@ -1548,13 +1548,12 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                while (pos > 0 && par.isDeleted(pos - 1))
                        --pos;
 
-               string const arg = to_utf8(cmd.argument());
                char_type c = ' ';
                if (pos > 0 && (!cur.prevInset() || !cur.prevInset()->isSpace()))
                        c = par.getChar(pos - 1);
-               InsetQuotes::QuoteTimes const quote_type = (arg == "single")
+               InsetQuotes::QuoteTimes const quote_type = (cmd.getArg(0) == "single")
                        ? InsetQuotes::SingleQuotes : InsetQuotes::DoubleQuotes;
-               cur.insert(new InsetQuotes(cur.buffer(), c, quote_type));
+               cur.insert(new InsetQuotes(cur.buffer(), c, quote_type, cmd.getArg(1), cmd.getArg(2)));
                cur.buffer()->updateBuffer();
                cur.posForward();
                break;