CtrlLib, ide: Ide editor truncates loaded file after 200/600MBs and marks it as 'truncated' (and read only)

git-svn-id: svn://ultimatepp.org/upp/trunk@8826 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-08-21 11:06:13 +00:00
parent 2f6fdfc629
commit ebe05eb1d5
3 changed files with 8 additions and 3 deletions

View file

@ -27,9 +27,13 @@ TextCtrl::TextCtrl()
nobg = false;
rectsel = false;
#ifdef CPU_64
max_total = 400 * 1024 * 1024;
max_total = 600 * 1024 * 1024;
#else
#ifdef _DEBUG
max_total = 100 * 1024 * 1024;
#else
max_total = 200 * 1024 * 1024;
#endif
#endif
truncated = false;
}
@ -298,6 +302,7 @@ finish:
Update();
SetSb();
PlaceCaret(0);
DDUMP(truncated);
return line.GetCount() > 1 ? cr ? LE_CRLF : LE_LF : LE_DEFAULT;
}

View file

@ -116,7 +116,7 @@ public:
enum LE { LE_DEFAULT, LE_CRLF, LE_LF };
int Load(Stream& s, byte charset = CHARSET_DEFAULT);
bool IsTruncated() const { return false; }
bool IsTruncated() const { return truncated; }
void Save(Stream& s, byte charset = CHARSET_DEFAULT, int line_endings = LE_DEFAULT) const;
int GetInvalidCharPos(byte charset = CHARSET_DEFAULT) const;

View file

@ -744,7 +744,7 @@ void AppMain___()
SetVppLogSizeLimit(200000000);
#ifdef _DEBUG
MemoryLimitKb(1000000);
// MemoryLimitKb(1000000);
#endif
#ifdef PLATFORM_POSIX