mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix display of single-char macro names
Essentially, all characters are allowed in single-char macro names.
Part of #11158.
(cherry picked from commit 95bc273a59
)
This commit is contained in:
parent
a8ad4002a0
commit
eba2f14fa7
@ -800,11 +800,13 @@ bool InsetMathMacro::validName() const
|
||||
return false;*/
|
||||
|
||||
// valid characters?
|
||||
for (size_t i = 0; i<n.size(); ++i) {
|
||||
if (!(n[i] >= 'a' && n[i] <= 'z')
|
||||
&& !(n[i] >= 'A' && n[i] <= 'Z')
|
||||
&& n[i] != '*')
|
||||
return false;
|
||||
if (n.size() > 1) {
|
||||
for (size_t i = 0; i<n.size(); ++i) {
|
||||
if (!(n[i] >= 'a' && n[i] <= 'z')
|
||||
&& !(n[i] >= 'A' && n[i] <= 'Z')
|
||||
&& n[i] != '*')
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -1292,11 +1292,13 @@ bool InsetMathMacroTemplate::validName() const
|
||||
return false;*/
|
||||
|
||||
// valid characters?
|
||||
for (size_t i = 0; i < n.size(); ++i) {
|
||||
if (!(n[i] >= 'a' && n[i] <= 'z')
|
||||
&& !(n[i] >= 'A' && n[i] <= 'Z')
|
||||
&& n[i] != '*')
|
||||
return false;
|
||||
if (n.size() > 1) {
|
||||
for (size_t i = 0; i < n.size(); ++i) {
|
||||
if (!(n[i] >= 'a' && n[i] <= 'z')
|
||||
&& !(n[i] >= 'A' && n[i] <= 'Z')
|
||||
&& n[i] != '*')
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -58,6 +58,9 @@ What's new
|
||||
|
||||
- Fix selection of unmarked RtL characters with Qt 5.11 (bug 11284).
|
||||
|
||||
- Fix on-screen display of macros whose name is a single non-letter symbol
|
||||
(part of bug 11158).
|
||||
|
||||
|
||||
* INTERNALS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user