fix insetexternal read; fix numpad Enter key

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_1_6@2054 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2001-05-29 12:54:33 +00:00
parent 4feee3064d
commit c2f68fd01d
4 changed files with 32 additions and 4 deletions

View File

@ -1,3 +1,14 @@
2001-05-29 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/insets/insetexternal.C (Read): the reading of external
insets now checks for \end_inset and removes it form the input
stream.
* src/lyx_main.C (defaultKeyBindings): change default binding of
KP_Enter.
* lib/bind/xemacs.bind: add ~S to a binding using asciitilde
2001-05-27 Dekel Tsur <dekelts@tau.ac.il>
* src/LaTeX.C (deplog): Make sure that the main .tex file is in the

View File

@ -253,7 +253,7 @@
\bind "C-c C-f C-r" "font-roman"
\bind "C-c C-f C-t" "font-code" #typewriter
\bind "C-c asciitilde" "math-mode"
\bind "C-c ~S-asciitilde" "math-mode"
\bind "C-c quoteleft" "error-next"

View File

@ -325,8 +325,25 @@ void InsetExternal::Write(Buffer const *, std::ostream & os) const
void InsetExternal::Read(Buffer const *, LyXLex & lex)
{
lex.EatLine();
string const format = lex.GetString();
string format;
string token;
// Read inset data from lex and store in format
if (lex.EatLine()) {
format = lex.GetString();
} else
lex.printError("InsetExternal: Parse error: `$$Token'");
while (lex.IsOK()) {
lex.nextToken();
token = lex.GetString();
if (token == "\\end_inset")
break;
}
if (token != "\\end_inset") {
lex.printError("Missing \\end_inset at this point. "
"Read: `$$Token'");
}
string::size_type const pos1 = format.find(",");
templatename = format.substr(0, pos1);
string::size_type const pos2 = format.find("\",\"", pos1);

View File

@ -483,7 +483,7 @@ void LyX::defaultKeyBindings(kb_keymap * kbmap)
// e.g. Num Lock set
kbmap->bind("KP_0", LFUN_SELFINSERT);
kbmap->bind("KP_Decimal", LFUN_SELFINSERT);
kbmap->bind("KP_Enter", LFUN_SELFINSERT);
kbmap->bind("KP_Enter", LFUN_BREAKPARAGRAPH);
kbmap->bind("KP_1", LFUN_SELFINSERT);
kbmap->bind("KP_2", LFUN_SELFINSERT);
kbmap->bind("KP_3", LFUN_SELFINSERT);