On Mon, Dec 03, 2001 at 06:28:39PM +0200, Martin Vermeer wrote: > > > Could you please check whether M-m ( produces a (...) inset in math? > > > If not: Anybody an idea why it does not anymore? > > > > I think this is my fault. Again. > > john > > I have this problem too in a checkout from last saturday... the '(' > character goes right through to MathCursor::interpret(char c).
A real bleary-eyed one .... here's the patch. please apply thanks john -- "Faced with the prospect of rereading this book, I would rather have my brains ripped out by a plastic fork." - Charles Cooper on "Business at the Speed of Thought"
Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.429 diff -u -r1.429 ChangeLog --- src/ChangeLog 2001/12/03 13:17:01 1.429 +++ src/ChangeLog 2001/12/03 16:23:23 @@ -1,3 +1,8 @@ +2001-12-03 John Levon <[EMAIL PROTECTED]> + + * kbsequence.h: + * kbsequence.C: re-instate nmodifier mask + 2001-12-03 Juergen Vigna <[EMAIL PROTECTED]> * text.C (rowLast): simplified code Index: src/kbsequence.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/kbsequence.h,v retrieving revision 1.7 diff -u -r1.7 kbsequence.h --- src/kbsequence.h 2001/11/30 13:25:35 1.7 +++ src/kbsequence.h 2001/12/03 16:23:23 @@ -34,9 +34,10 @@ * Add a key to the key sequence and look it up in the curmap * if the latter is defined. * @param mod modifier mask + * @param nmod which modifiers to mask out for equality test * @return the action matching this key sequence or LFUN_UNKNOWN_ACTION */ - kb_action addkey(unsigned int key, unsigned int mod); + kb_action addkey(unsigned int key, unsigned int mod, unsigned int nmod = 0); /** * Add a sequence of keys from a string to the sequence Index: src/kbsequence.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/kbsequence.C,v retrieving revision 1.18 diff -u -r1.18 kbsequence.C --- src/kbsequence.C 2001/11/30 13:25:35 1.18 +++ src/kbsequence.C 2001/12/03 16:23:23 @@ -29,7 +29,7 @@ enum { ModsMask = ShiftMask | ControlMask | Mod1Mask }; -kb_action kb_sequence::addkey(unsigned int key, unsigned int mod) +kb_action kb_sequence::addkey(unsigned int key, unsigned int mod, unsigned int nmod) { // adding a key to a deleted sequence // starts a new sequence @@ -40,7 +40,7 @@ modifiers.clear(); } - modifiers.push_back(mod); + modifiers.push_back(mod + (nmod << 16)); sequence.push_back(key); ++length_; @@ -58,6 +58,7 @@ string::size_type i = 0; unsigned int mod = 0; + unsigned int nmod = 0; while (i < s.length()) { if (s[i] == ' ') ++i; @@ -85,12 +86,15 @@ && s[i + 2] == '-') { switch (s[i + 1]) { case 's': case 'S': + nmod |= ShiftMask; i += 3; continue; case 'c': case 'C': + nmod |= ControlMask; i += 3; continue; case 'm': case 'M': + nmod |= Mod1Mask; i += 3; continue; default: @@ -111,7 +115,7 @@ } i = j; - addkey(key, mod); + addkey(key, mod, nmod); mod = 0; } } @@ -149,7 +153,7 @@ string buf; buf += print(); - + if (!curmap) return buf;