ide: error handling improvements...

git-svn-id: svn://ultimatepp.org/upp/trunk@7453 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-06-17 10:41:00 +00:00
parent f0dfb73e21
commit e1bbcb4ece
4 changed files with 17 additions and 5 deletions

View file

@ -56,7 +56,16 @@ void Console::Append(const String& s) {
SetEditable();
MoveTextEnd();
WString t = Filter(FromSystemCharset(s), sAppf).ToWString();
int l0 = GetLineCount() - 1;
if(IsRunning())
for(const wchar *q = t; *q; q++) {
if(*q == '\n') {
WhenLine(line.ToString());
line.Clear();
}
else
if((byte)*q >= ' ')
line.Cat(*q);
}
int mg = sb.GetReducedViewSize().cx / GetFont().Info().GetAveWidth();
if(wrap_text && mg > 4) {
int x = GetColumnLine(GetCursor()).x;
@ -82,8 +91,6 @@ void Console::Append(const String& s) {
SetEditPos(p);
SetSelection(l, h);
}
while(l0 >= 0 && l0 < GetLineCount() - 1)
WhenLine(GetUtf8Line(l0++));
}
bool Console::Key(dword key, int count) {