mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
fix command-sequence handling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8734 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fc09056ccc
commit
37b93beec5
@ -1,3 +1,8 @@
|
|||||||
|
2004-05-03 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
|
* lyxfunc.C (dispatch):
|
||||||
|
(getStatus): fix handling of LFUN_SEQUENCE
|
||||||
|
|
||||||
2004-04-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
2004-04-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
* debug.C (showLevel): do not forget the end-of-line marker
|
* debug.C (showLevel): do not forget the end-of-line marker
|
||||||
|
@ -437,6 +437,14 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this one is difficult to get right. As a half-baked
|
||||||
|
// solution, we consider only the first action of the sequence
|
||||||
|
case LFUN_SEQUENCE: {
|
||||||
|
// argument contains ';'-terminated commands
|
||||||
|
string const firstcmd = token(cmd.argument, ';', 0);
|
||||||
|
flag = getStatus(lyxaction.lookupFunc(firstcmd));
|
||||||
|
}
|
||||||
|
|
||||||
case LFUN_MENUNEW:
|
case LFUN_MENUNEW:
|
||||||
case LFUN_MENUNEWTMPLT:
|
case LFUN_MENUNEWTMPLT:
|
||||||
case LFUN_WORDFINDFORWARD:
|
case LFUN_WORDFINDFORWARD:
|
||||||
@ -477,7 +485,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
|||||||
case LFUN_REPEAT:
|
case LFUN_REPEAT:
|
||||||
case LFUN_EXPORT_CUSTOM:
|
case LFUN_EXPORT_CUSTOM:
|
||||||
case LFUN_PRINT:
|
case LFUN_PRINT:
|
||||||
case LFUN_SEQUENCE:
|
|
||||||
case LFUN_SAVEPREFERENCES:
|
case LFUN_SAVEPREFERENCES:
|
||||||
case LFUN_SCREEN_FONT_UPDATE:
|
case LFUN_SCREEN_FONT_UPDATE:
|
||||||
case LFUN_SET_COLOR:
|
case LFUN_SET_COLOR:
|
||||||
@ -1191,14 +1198,16 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LFUN_SEQUENCE:
|
case LFUN_SEQUENCE: {
|
||||||
// argument contains ';'-terminated commands
|
// argument contains ';'-terminated commands
|
||||||
while (!argument.empty()) {
|
string arg = argument;
|
||||||
|
while (!arg.empty()) {
|
||||||
string first;
|
string first;
|
||||||
string rest = split(argument, first, ';');
|
arg = split(arg, first, ';');
|
||||||
dispatch(lyxaction.lookupFunc(rest));
|
dispatch(lyxaction.lookupFunc(first));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case LFUN_SAVEPREFERENCES: {
|
case LFUN_SAVEPREFERENCES: {
|
||||||
Path p(user_lyxdir());
|
Path p(user_lyxdir());
|
||||||
|
Loading…
Reference in New Issue
Block a user