public void Reset() { ClearModifiers(); enabled = true; if (curset == null) { return; } ematch = new eStack(curset.e, null); }
public void Eat(Keys k, char c, ssEventType t) { if (curset == null) { return; } if (!enabled) { if (MouseModifierDown()) { return; } else { enabled = true; } } if (IsModifier(k) && SingleMatch(ematch.e, k, c, t)) { if (ematch.e.a == null) { return; } } if (ematch.e.nxt == null) { Reset(); return; } ssEvent e = ematch.e.nxt; int lcnt = 0; while (e != null) { if (SingleMatch(e, k, c, t)) { break; } e = e.alt; lcnt++; } if (e == null) { if (t == ssEventType.press) { defInsert.Invoke(frm, null); } Reset(); return; } else { ematch = new eStack(e, ematch); if (e.a != null || e.cmd != "") { if (e.a != null) { e.a.Invoke(frm, null); } else { if (e.cmdopt == ssEventCmdOption.begin) { frm.Ed.Msg(e.cmd); frm.Ed.Log.Activate(); } else { string[] ss = e.cmd.Split(new string[] { "`" }, StringSplitOptions.None); if (e.cmdopt == ssEventCmdOption.execPreserveDot) { frm.SaveCursor(); } foreach (string s in ss) { frm.Ed.Do(s); } if (e.cmdopt == ssEventCmdOption.execPreserveDot) { frm.RestoreCursor(); } } } if (!e.cont) { ematch = ematch.nxt; enabled = false; } } } }
public eStack(ssEvent ee, eStack st) { e = ee; nxt = st; }