diff --git a/uppsrc/ide/Console.cpp b/uppsrc/ide/Console.cpp index 162f856f0..60f421510 100644 --- a/uppsrc/ide/Console.cpp +++ b/uppsrc/ide/Console.cpp @@ -56,7 +56,7 @@ void Console::Append(const String& s) { SetEditable(); MoveTextEnd(); WString t = Filter(FromSystemCharset(s), sAppf).ToWString(); - int l0 = GetLineCount(); + int l0 = GetLineCount() - 1; int mg = sb.GetReducedViewSize().cx / GetFont().Info().GetAveWidth(); if(wrap_text && mg > 4) { int x = GetColumnLine(GetCursor()).x; @@ -82,7 +82,7 @@ void Console::Append(const String& s) { SetEditPos(p); SetSelection(l, h); } - while(l0 < GetLineCount()) + while(l0 >= 0 && l0 < GetLineCount() - 1) WhenLine(GetUtf8Line(l0++)); } diff --git a/uppsrc/ide/Errors.cpp b/uppsrc/ide/Errors.cpp index 91b5901c2..5e13b00ab 100644 --- a/uppsrc/ide/Errors.cpp +++ b/uppsrc/ide/Errors.cpp @@ -27,8 +27,8 @@ bool Ide::FindLineError(const String& ln, FindLineErrorCache& cache, ErrorInfo& f.file = TrimLeft(f.file); String upp = GetUppDir(); #ifdef PLATFORM_WIN32 - if(file[0] == '\\' || file[0] == '/') - file = String(upp[0], 1) + ':' + file; + if(f.file[0] == '\\' || f.file[0] == '/') + f.file = String(upp[0], 1) + ':' + f.file; #endif if(!IsFullPath(f.file) && *f.file != '\\' && *f.file != '/') { if(cache.wspc_paths.IsEmpty()) { @@ -257,6 +257,7 @@ void Ide::SetErrorEditor() void Ide::ConsoleLine(const String& line) { + DDUMP(line); ErrorInfo f; if(FindLineError(line, error_cache, f)) { int cnt = error.GetCount();