mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Enter subindex on Enter in index
This commit is contained in:
parent
5a7c6aaeee
commit
9dc9fa68ce
@ -29,6 +29,7 @@
|
||||
#include "LaTeX.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyX.h"
|
||||
#include "output_latex.h"
|
||||
#include "output_xhtml.h"
|
||||
#include "xml.h"
|
||||
@ -579,6 +580,14 @@ void InsetIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
cur.bv().updateDialog("index", params2string(params_));
|
||||
break;
|
||||
|
||||
case LFUN_PARAGRAPH_BREAK: {
|
||||
// Since this inset in single-par anyway, let's use
|
||||
// return to enter subindexes
|
||||
FuncRequest fr(LFUN_INDEXMACRO_INSERT, "subindex");
|
||||
lyx::dispatch(fr);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
InsetCollapsible::doDispatch(cur, cmd);
|
||||
break;
|
||||
@ -610,6 +619,9 @@ bool InsetIndex::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
return true;
|
||||
}
|
||||
|
||||
case LFUN_PARAGRAPH_BREAK:
|
||||
return macrosPossible("subindex");
|
||||
|
||||
case LFUN_INDEXMACRO_INSERT:
|
||||
return macrosPossible(cmd.getArg(0));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user