mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +00:00
Enable environment-split for standard classes (#9023)
This commit is contained in:
parent
e165ff18be
commit
0dc4f4636f
@ -1406,7 +1406,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
lyx::dispatch(FuncRequest(LFUN_DEPTH_DECREMENT));
|
lyx::dispatch(FuncRequest(LFUN_DEPTH_DECREMENT));
|
||||||
}
|
}
|
||||||
bool const morecont = cur.lastpos() > cur.pos();
|
bool const morecont = cur.lastpos() > cur.pos();
|
||||||
lyx::dispatch(FuncRequest(LFUN_LAYOUT, "Separator"));
|
// FIXME This hardcoding is bad
|
||||||
|
docstring const sep =
|
||||||
|
cur.buffer()->params().documentClass().hasLayout(from_ascii("Separator"))
|
||||||
|
? from_ascii("Separator") : from_ascii("--Separator--");
|
||||||
|
lyx::dispatch(FuncRequest(LFUN_LAYOUT, sep));
|
||||||
lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK, "inverse"));
|
lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK, "inverse"));
|
||||||
if (morecont)
|
if (morecont)
|
||||||
lyx::dispatch(FuncRequest(LFUN_DOWN));
|
lyx::dispatch(FuncRequest(LFUN_DOWN));
|
||||||
@ -2950,7 +2954,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_ENVIRONMENT_SPLIT: {
|
case LFUN_ENVIRONMENT_SPLIT: {
|
||||||
if (!cur.buffer()->params().documentClass().hasLayout(from_ascii("Separator"))) {
|
// FIXME This hardcoding is bad
|
||||||
|
if (!cur.buffer()->params().documentClass().hasLayout(from_ascii("Separator"))
|
||||||
|
&& !cur.buffer()->params().documentClass().hasLayout(from_ascii("--Separator--"))) {
|
||||||
enable = false;
|
enable = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user