swallow <Return> events in mathed. Should mimic 1.3.x behaviour.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8636 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2004-04-08 15:41:48 +00:00
parent 01661a4030
commit a8a1f10e76
2 changed files with 13 additions and 10 deletions

View File

@ -1017,11 +1017,11 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
// return DispatchResult(true, true);
//}
MathNestInset::priv_dispatch(cur, cmd);
return;
break;
case LFUN_INSET_DIALOG_UPDATE:
GridInsetMailer(*this).updateDialog(&cur.bv());
return;
break;
// insert file functions
case LFUN_DELETE_LINE_FORWARD:
@ -1029,7 +1029,7 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
//macroModeClose();
//if (selection_) {
// selDel();
// return;
// break;
//}
if (nrows() > 1)
delRow(cur.row());
@ -1037,12 +1037,12 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
cur.idx() = cur.lastidx();
if (cur.pos() > cur.lastpos())
cur.pos() = cur.lastpos();
return;
break;
case LFUN_CELL_SPLIT:
////recordUndo(cur, Undo::ATOMIC);
splitCell(cur);
return;
break;
case LFUN_BREAKLINE: {
////recordUndo(cur, Undo::INSERT);
@ -1062,7 +1062,7 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
//mathcursor->normalize();
cmd = FuncRequest(LFUN_FINISHED_LEFT);
return;
break;
}
case LFUN_TABULAR_FEATURE: {
@ -1118,10 +1118,10 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
swapCol(col(cur.idx()));
else {
cur.undispatched();
return;
break;
}
lyxerr << "returning FINISHED_LEFT" << endl;
return;
break;
}
case LFUN_PASTE: {
@ -1154,7 +1154,7 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
for (col_type c = 0; c < grid.ncols(); ++c)
cell(i).append(grid.cell(grid.index(r, c)));
}
return;
break;
}
case LFUN_HOMESEL:

View File

@ -784,9 +784,12 @@ void MathHullInset::doExtern(LCursor & cur, FuncRequest & func)
void MathHullInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
{
//lyxerr << "*** MathHullInset: request: " << cmd << endl;
switch (cmd.action) {
case LFUN_BREAKPARAGRAPH:
// just swallow this
break;
case LFUN_BREAKLINE:
if (type_ == "simple" || type_ == "equation") {
mutate("eqnarray");