Hi,
This is my first message and the first time I try to patch something !!
I submitted myself the Feature request, implemented using LineCopy() / SCI_LINECOPY message in wxscntilla.
This does not work as expected.
So I downloaded CodeLite from SVN and had look at the code, to see how to improve the patch above.
Finally, I found the solution is in the source code of Scintilla.
-- To have a working patch in the expected way, I guess the solution should be to use the SCI_COPYALLOWLINE message in scintilla. See the Scintilla Documentation :
http://www.scintilla.org/ScintillaDoc.h ... YALLOWLINE
-- However, the COPYALLOWLINE message is NOT implemented in wxscintilla.h/cpp !!!
-- Obviously, I should contact first the maintainer of wxscintilla code, but before that, I would like to test the code.
And for testing the code, I would like to run my CodeLite SVN version !
My CodeLite workspaace compiles OK, but crashes at welcome screen ("memory at 0x0... The memory could not be read").I suppose it is related to the path or version of my wxWidget library (=> MINGW gcc, UNICODE SHARED).
BTW: Would it be possible to have the file "BuildInfo.txt" more precise (paths,configurations etc) ?
For now, if you ave a chance to implement the correction below, or similar,
in the meantime, maybe I will be able to use a patched runtime of CodeLite ! :- )
--- Below is the code I try to test:
In wxscintilla.h (after LineCopy() declaration):
Code: Select all
// Same as COPY except that if the selection is empty then the current line is copied.
void CopyAllowLine(); // [IRMLAB-100615]
In wxscintilla.cpp (after wxScintilla::LineCopy()):
Code: Select all
// SCI_COPYALLOWLINE works the same as SCI_COPY except that if the selection
// is empty then the current line is copied.
// On Windows, an extra "MSDEVLineSelect" marker is added to the clipboard
// which is then used in SCI_PASTE to paste the whole line before the current
// line.
// [IRMLAB-100615]
void wxScintilla::CopyAllowLine() {
SendMsg (SCI_COPYALLOWLINE, 0, 0);
}
Finally, this patch becomes:
Code: Select all
if (event.GetId() == wxID_COPY) {
- editor->Copy();
+
+ if (editor->GetSelectedText() == wxT(""))
+ {
+ editor->CopyAllowLine(); // [CHANGE:100615-IRMLAB]
+ }
+ else
+ {
+ editor->Copy();
+ }
} else if (event.GetId() == wxID_CUT) {
editor->Cut();
Voila ! Thanks for this good IDE.
I choose it because its implementation of _VIRTUAL_ folders in Workspace, with the Explorer tab as a complement.
I searched this (obvious !) feature long time ago.
Don't know any other IDE that offers this way to manage projects
Best regards - IRM