mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
2f6fdfc629
commit
ebe05eb1d5
3 changed files with 8 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -744,7 +744,7 @@ void AppMain___()
|
|||
|
||||
SetVppLogSizeLimit(200000000);
|
||||
#ifdef _DEBUG
|
||||
MemoryLimitKb(1000000);
|
||||
// MemoryLimitKb(1000000);
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue