From ebe05eb1d51e41077dc5bf3ea3ee78f54dcf67ca Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 21 Aug 2015 11:06:13 +0000 Subject: [PATCH] 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 --- uppsrc/CtrlLib/Text.cpp | 7 ++++++- uppsrc/CtrlLib/TextEdit.h | 2 +- uppsrc/ide/idewin.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/uppsrc/CtrlLib/Text.cpp b/uppsrc/CtrlLib/Text.cpp index 99352dd0d..0a282d0d9 100644 --- a/uppsrc/CtrlLib/Text.cpp +++ b/uppsrc/CtrlLib/Text.cpp @@ -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; } diff --git a/uppsrc/CtrlLib/TextEdit.h b/uppsrc/CtrlLib/TextEdit.h index 111761125..20e0ee616 100644 --- a/uppsrc/CtrlLib/TextEdit.h +++ b/uppsrc/CtrlLib/TextEdit.h @@ -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; diff --git a/uppsrc/ide/idewin.cpp b/uppsrc/ide/idewin.cpp index 59f49693c..4b1319a5d 100644 --- a/uppsrc/ide/idewin.cpp +++ b/uppsrc/ide/idewin.cpp @@ -744,7 +744,7 @@ void AppMain___() SetVppLogSizeLimit(200000000); #ifdef _DEBUG - MemoryLimitKb(1000000); +// MemoryLimitKb(1000000); #endif #ifdef PLATFORM_POSIX