InsetListings.cpp: simplify.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29246 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-04-15 17:00:43 +00:00
parent a018cae244
commit e4a6b62f03

View File

@ -316,11 +316,8 @@ void InsetListings::doDispatch(Cursor & cur, FuncRequest & cmd)
} else {
// Maybe we shouldn't allow tabs within a line, because they
// are not (yet) aligned as one might do expect.
cur.recordUndo();
if (cur.selection())
cap::cutSelection(cur, false, false);
cur.insert(from_ascii("\t"));
cur.finishUndo();
FuncRequest cmd(LFUN_SELF_INSERT, from_ascii("\t"));
dispatch(cur, cmd);
}
break;
}