U++: Issueshttps://www.ultimatepp.org/redmine/https://www.ultimatepp.org/redmine/redmine/favicon.ico2019-04-14T12:15:41ZRedmine
Redmine Bug #1949 (Approved): WriteClipboardHTML : the posix version is messinghttps://www.ultimatepp.org/redmine/issues/19492019-04-14T12:15:41ZAbdelghani Omariab.omari@gmail.com
<p>the current version (CtrlCore/CtrlClip.cpp, line 299) is Windows only.</p>
<pre>
#ifdef PLATFORM_POSIX
void WriteClipboardHTML(const String& html)
{
WriteClipboard("text/html", html);
}
#else
the current version
#endif
</pre> Feature #1905 (Approved): TheIde/Editor : Add a submenu, diff, between Selected text and Clipbo...https://www.ultimatepp.org/redmine/issues/19052018-09-27T11:18:07ZAbdelghani Omariab.omari@gmail.com
<pre>
void Ide::EditorMenu(Bar& bar)
{
InsertAdvanced(bar);
bar.MenuSeparator();
OnlineSearchMenu(bar);
bar.MenuSeparator();
editor.StdBar(bar);
bar.Add(editor.IsSelection() && IsClipboardAvailableText(), "Diff", [=]() {
DiffDlg dlg;
dlg.diff.left.RemoveFrame(dlg.p);
dlg.diff.Set(ReadClipboardText(), editor.GetSelection());
dlg.Run();
});
}
</pre>
<p>Thanks</p> Feature #1904 (Approved): LocalProcess : add the capability of setting process working directory https://www.ultimatepp.org/redmine/issues/19042018-09-27T11:09:11ZAbdelghani Omariab.omari@gmail.com
<p>Hi,</p>
<p>I have tested the WIN implementation<br />but i do not have tested the POSIX one.</p>
<p>Thanks</p> Bug #1858 (Approved): TextCtrl::RemoveSelection shall return false when there is no selectionhttps://www.ultimatepp.org/redmine/issues/18582018-03-26T16:51:27ZAbdelghani Omariab.omari@gmail.com
<p>Test Case:<br />in a CodeEditor instance, filled with text, do that :<br />repeat :<br /> - set the cursor with a mouse left click, keeping the mouse button pressed for more than one second<br /> - try to remove a character using backspace button.</p>
<p>result :<br /> the backspace does not remove the character.</p>
<p>I have investigate this behavior, and i found that TextCtrl::RemoveSelection can return true, even when there is no selection.<br />RemoveSelection is used in LineEdit::Backspace :<br />if(IsReadOnly() || RemoveSelection() || cursor == 0) return;</p> Feature #1856 (Approved): Abbreviation for FindFile https://www.ultimatepp.org/redmine/issues/18562018-03-08T11:30:09ZAbdelghani Omariab.omari@gmail.com
<p>in order to avoid the wrong use of FindFile, i propose adding abbriviations "ff" and "ffb".</p>
<p>the patch is for the file uppsrc/ide/abbr.cpp</p> Bug #1855 (Approved): FormatIntAlpha does not always give the right results.https://www.ultimatepp.org/redmine/issues/18552018-03-07T17:36:30ZAbdelghani Omariab.omari@gmail.com
<p>Test Case:<br /><pre>
void TestFormatIntAlpha()
{
ASSERT(FormatIntAlpha(1) == "A");
ASSERT(FormatIntAlpha(2) == "B");
ASSERT(FormatIntAlpha(3) == "C");
ASSERT(FormatIntAlpha(25) == "Y");
ASSERT(FormatIntAlpha(26) == "Z"); // 26*1
ASSERT(FormatIntAlpha(27) == "AA");
ASSERT(FormatIntAlpha(51) == "AY");
ASSERT(FormatIntAlpha(52) == "AZ"); // 26*2
ASSERT(FormatIntAlpha(53) == "BA");
ASSERT(FormatIntAlpha(78) == "BZ"); // 26*3
ASSERT(FormatIntAlpha(26*26) == "YZ");
ASSERT(FormatIntAlpha(26*26 + 1) == "ZA");
ASSERT(FormatIntAlpha(26*26 + 26 - 1) == "ZY");
ASSERT(FormatIntAlpha(26*26 + 26) == "ZZ");
ASSERT(FormatIntAlpha(26*26 + 26+1) == "AAA");
ASSERT(FormatIntAlpha(26*26 + 26+2) == "AAB");
ASSERT(FormatIntAlpha(26*26 + 26+3) == "AAC");
ASSERT(FormatIntAlpha(26*26 + 26+26) == "AAZ");
ASSERT(FormatIntAlpha(26*26 + 26+26 + 1) == "ABA");
}
</pre></p> Bug #1854 (Approved): CParser::NoSkipComments() https://www.ultimatepp.org/redmine/issues/18542018-03-07T17:28:13ZAbdelghani Omariab.omari@gmail.com
<p>a probleme occure when CParser::NoSkipComments() is called before term initialisation.</p>
<p>here a test case:<br /><pre>
void TestCParser() {
String tpl = " same text ";
CParser p;
p.NoSkipComments();
p.Set(tpl);
}
</pre></p>
<p>NoSkipComments() calls SkipComment(false). IMO it shouldn't.</p> Bug #1739 (Approved): ArrayCtrl: in Multiselect mode, WhenSel is called 5 time each cursor changehttps://www.ultimatepp.org/redmine/issues/17392017-06-05T16:44:00ZAbdelghani Omariab.omari@gmail.com
<p>test case :<br /><pre>
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
GUI_APP_MAIN
{
TopWindow win;
ArrayCtrl arr;
arr.AddColumn("");
arr.MultiSelect();
arr.WhenSel = [] { PromptOK("WhenSel");};
for(int i = 0; i < 10; i++)
arr.Add(i);
win.Add(arr.SizePos());
win.Run();
}
</pre></p> Refactoring #1732 (Rejected): GDB MI2 interface: new implimentation https://www.ultimatepp.org/redmine/issues/17322017-05-28T23:05:43ZAbdelghani Omariab.omari@gmail.com
<p>the new parser is based on ParseJSON(const char *s).<br />it is in beta stage.</p>
<p>this week-end, i have started his integration in theide.<br />in first time i keep GUI as is, i change only the MI interface.</p> Feature #1731 (Rejected): GDB - MingGW : Display output of target application in a separate consolehttps://www.ultimatepp.org/redmine/issues/17312017-05-28T18:35:19ZAbdelghani Omariab.omari@gmail.com
<p>the command "set new-console on" is mswindows specific, it allows the output redirection of the program to a new console.</p>
<p>the patch then in Gdb.cpp:<br /><pre>
bool Gdb::Create(One<Host>&& _host, const String& exefile, const String& cmdline, bool console)
{
....
Cmd("set prompt " GDB_PROMPT);
Cmd("set disassembly-flavor intel");
Cmd("set exec-done-display off");
Cmd("set annotate 1");
Cmd("set height 0");
Cmd("set width 0");
Cmd("set confirm off");
Cmd("set print asm-demangle");
Cmd("set print static-members off");
Cmd("set print vtbl off");
Cmd("set print repeat 0");
Cmd("set print null-stop");
Cmd("set new-console on"); // LINE ADDED
....
}
</pre></p> Refactoring #1725 (Rejected): usc extension is used for Macro file and for designerModule filehttps://www.ultimatepp.org/redmine/issues/17252017-05-17T12:37:25ZAbdelghani Omariab.omari@gmail.com
<p>The usc extension is used for two different things:<br /> - macro file, and designer module.</p>
<p>Is it possible to reserve a separate extension for the module usc file?<br />for example : msc or d(esigner)sc or l(ayout)sc</p> Bug #1724 (Approved): LocalProcess portability issue: LocalProcess::Read2 can not return more tha...https://www.ultimatepp.org/redmine/issues/17242017-05-17T12:22:45ZAbdelghani Omariab.omari@gmail.com
<p>test case:<br /><pre>
CONSOLE_APP_MAIN
{
String str = String('A', 1024);
str << "B";
String f = GetDataFile("data.txt");
SaveFile(f, str);
String cmd;
#ifdef PLATFORM_POSIX
cmd << "cat \"" << f << "\"";
#else
cmd << "cmd /c Type \"" << f << "\"";
#endif
LocalProcess proc;
proc.Start(cmd);
Sleep(200);
String r;
proc.Read(r);
DUMP(r.GetCount());
proc.Read(r);
DUMP(r.GetCount());
}
</pre><br />output :<br /> POSIX:<br /><pre>
r.GetCount() = 1025
r.GetCount() = 0
</pre><br /> WIN32:<br /><pre>
r.GetCount() = 1024
r.GetCount() = 1
</pre></p>
<p>this is because the WIN32 version use "if" and the POSIX use "while".</p>
<p>the patch :</p>
<pre>
bool LocalProcess::Read2(String& reso, String& rese)
{
LLOG("LocalProcess::Read2");
reso = wreso;
rese = wrese;
wreso.Clear();
wrese.Clear();
#ifdef PLATFORM_WIN32
LLOG("LocalProcess::Read");
bool was_running = IsRunning();
char buffer[1024];
dword n;
while(hOutputRead && PeekNamedPipe(hOutputRead, NULL, 0, NULL, &n, NULL) && n && // LINE modified : replace "if" with " "while"
ReadFile(hOutputRead, buffer, sizeof(buffer), &n, NULL) && n)
reso.Cat(buffer, n);
while(hErrorRead && PeekNamedPipe(hErrorRead, NULL, 0, NULL, &n, NULL) && n && // LINE modified : replace "if" with " "while"
ReadFile(hErrorRead, buffer, sizeof(buffer), &n, NULL) && n)
rese.Cat(buffer, n);
if(convertcharset) {
reso = FromOEMCharset(reso);
rese = FromOEMCharset(rese);
}
return .......
</pre> Bug #1723 (Approved): Ide::IdePaste(String& data) shall be reviewed, it stop when file size reach...https://www.ultimatepp.org/redmine/issues/17232017-05-17T12:09:06ZAbdelghani Omariab.omari@gmail.com
<p>In this function I noticed two things:<br /> - it stops at 5000000 without warning<br /> - I do not understand the condition (if(len > 5000000 || data.GetLength() + len < 5000000))<br /> why (len > 5000000) ? perhaps it will be (len < 5000000)<br /> - 5000000 as limit is too small.<br /><pre>
void Ide::IdePaste(String& data)
{
data.Clear();
if(AcceptFiles(Clipboard())) {
Vector<String> s = GetFiles(Clipboard());
for(int i = 0; i < s.GetCount(); i++)
if(FileExists(s[i]) && IsTextFile(s[i], 10000)) {
int64 len = GetFileLength(s[i]);
if(len > 5000000 || data.GetLength() + len < 5000000)
data.Cat(LoadFile(s[i]));
}
}
}
</pre></p>
<p>here the patched function:<br /><pre>
void Ide::IdePaste(String& data)
{
data.Clear();
if(AcceptFiles(Clipboard())) {
Vector<String> s = GetFiles(Clipboard());
for(int i = 0; i < s.GetCount(); i++)
if(FileExists(s[i]) && IsTextFile(s[i], 10000)) {
int64 len = GetFileLength(s[i]);
if( data.GetLength() + len > 104857600) {
Exclamation("The file size reaches the limit of 100 MB.");
return;
}
data.Cat(LoadFile(s[i]));
}
}
}
</pre></p> Bug #1716 (Rejected): CParser:: IsId(const char*) && Id(const char*) does not check for valid C idhttps://www.ultimatepp.org/redmine/issues/17162017-05-12T18:51:26ZAbdelghani Omariab.omari@gmail.com
<p>for example:</p>
<pre><code>CParser p("123");</code></pre>
<pre><code>p.Id("123"); return true instead of false, because "123" is not a valid C id.</code></pre> Feature #1706 (Approved): TextDiffCtrl: Add Find in the FileListhttps://www.ultimatepp.org/redmine/issues/17062017-05-04T06:31:40ZAbdelghani Omariab.omari@gmail.com
<p><img src="https://www.ultimatepp.org/redmine/attachments/download/553/TextDiffImg.PNG" alt="" /></p>