mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 01:08:45 +00:00
InsetMathNest.cpp: allow to enter starred commands (fixed bug 4585)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@23297 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
389b03c870
commit
f7a0bff71f
@ -1253,7 +1253,11 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type c)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isAlphaASCII(c)) {
|
||||
// do not finish macro for known * commands
|
||||
WordList const & mwl = mathedWordList();
|
||||
bool star_macro = c == '*'
|
||||
&& (mwl.find(name.substr(1) + "*") != mwl.end());
|
||||
if (isAlphaASCII(c) || star_macro) {
|
||||
cur.activeMacro()->setName(name + docstring(1, c));
|
||||
return true;
|
||||
}
|
||||
|
@ -79,9 +79,6 @@ bool has_math_fonts;
|
||||
|
||||
namespace {
|
||||
|
||||
// file scope
|
||||
typedef std::map<docstring, latexkeys> WordList;
|
||||
|
||||
WordList theWordList;
|
||||
|
||||
|
||||
@ -233,6 +230,12 @@ void initSymbols()
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
WordList const & mathedWordList()
|
||||
{
|
||||
return theWordList;
|
||||
}
|
||||
|
||||
|
||||
void initMath()
|
||||
{
|
||||
|
@ -12,7 +12,10 @@
|
||||
#ifndef MATH_FACTORY_H
|
||||
#define MATH_FACTORY_H
|
||||
|
||||
#include "MathParser.h"
|
||||
#include "support/docstring.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace lyx {
|
||||
@ -30,6 +33,8 @@ MathAtom createInsetMath(char const * const);
|
||||
*/
|
||||
bool createInsetMath_fromDialogStr(docstring const &, MathData &);
|
||||
|
||||
typedef std::map<docstring, latexkeys> WordList;
|
||||
WordList const & mathedWordList();
|
||||
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -60,7 +60,7 @@ What's new
|
||||
|
||||
* USER INTERFACE:
|
||||
|
||||
|
||||
- Allow to enter starred math commands like "\tag*" (bug 4585).
|
||||
|
||||
|
||||
* DOCUMENTATION
|
||||
|
Loading…
Reference in New Issue
Block a user