RichEdit now cancels bullet on empty paragraph Enter

git-svn-id: svn://ultimatepp.org/upp/trunk@9527 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-02-25 18:09:21 +00:00
parent 71174caa1b
commit e1af4a4014

View file

@ -69,7 +69,13 @@ bool RichEdit::Key(dword key, int count)
return false;
if(!RemoveSelection() && InsertLineSpecial())
return true;
RichPos p = text.GetRichPos(cursor);
if(p.format.bullet != RichPara::BULLET_NONE && p.paralen == 0) {
Style();
formatinfo.bullet = RichPara::BULLET_NONE;
ApplyFormat(0, RichText::BULLET);
return true;
}
RichText::FormatInfo f = formatinfo;
InsertLine();
formatinfo = f;