diff --git a/uppsrc/ide/Insert.cpp b/uppsrc/ide/Insert.cpp index a992d88e5..5aa8dcbb0 100644 --- a/uppsrc/ide/Insert.cpp +++ b/uppsrc/ide/Insert.cpp @@ -180,8 +180,8 @@ void Ide::InsertAs(const String& data) { WithInsertAsLayout dlg; CtrlLayoutOKCancel(dlg, "Insert data"); - if(data.GetCount() > 20*1024) - Exclamation("Data size is too big!&(Limit is 20KB.)"); + if(data.GetCount() > 2*1024*1024) + Exclamation("Data size is too big!&(Limit is 2MB.)"); String f[6]; f[0] = data; f[1] = Encode64(data); @@ -200,7 +200,7 @@ void Ide::InsertAs(const String& data) String d = f[i]; WriteClipboardText(AsString(d.GetCount())); if(i == 0 || i == 1) - editor.Paste(AsCString(d).ToWString()); + editor.Paste(AsCString(d, 256).ToWString()); else { for(int i = 0; i < d.GetCount(); i += 256) { int e = min(i + 256, d.GetCount()); @@ -229,8 +229,8 @@ void Ide::InsertFileContent() String path = SelectInsertFile(); path.Replace("\\", "/"); if(path.GetCount()) { - if(GetFileLength(path) >= 20*1024) { - Exclamation("File is too big!&(Limit is 20KB.)"); + if(GetFileLength(path) >= 2*1024*1024) { + Exclamation("File is too big!&(Limit is 2MB.)"); return; } InsertAs(LoadFile(path)); diff --git a/uppsrc/ide/ide.lay b/uppsrc/ide/ide.lay index 434354dd9..020134239 100644 --- a/uppsrc/ide/ide.lay +++ b/uppsrc/ide/ide.lay @@ -912,10 +912,10 @@ LAYOUT(SlideShowSettingsLayout, 184, 188) END_LAYOUT LAYOUT(InsertAsLayout, 276, 168) - ITEM(Upp::Switch, format, SetLabel(t_("C string\nBase64 encoded text\nByte values\nLZ4 compressed byte values\nZ compressed byte values\n7z compressed byte values")).LeftPosZ(8, 260).TopPosZ(8, 96)) + ITEM(Upp::Switch, format, SetLabel(t_("C string\nBase64 encoded text\nByte values\nLZ4 compressed byte values\nZ compressed byte values\n7z compressed byte values")).LeftPosZ(8, 260).TopPosZ(8, 108)) ITEM(Upp::Button, ok, SetLabel(t_("OK")).RightPosZ(76, 64).BottomPosZ(8, 24)) ITEM(Upp::Button, cancel, SetLabel(t_("Cancel")).RightPosZ(8, 64).BottomPosZ(8, 24)) - ITEM(Upp::Label, dv___3, SetLabel(t_("Data length will be put into the clipboard")).LeftPosZ(8, 260).TopPosZ(108, 19)) + ITEM(Upp::Label, dv___3, SetLabel(t_("Data length will be put into the clipboard")).LeftPosZ(8, 260).TopPosZ(112, 19)) END_LAYOUT LAYOUT(UppHubLayout, 1000, 656)