This is the patch that address this feature request:
Copy line under cursor if no selection - ID: 3012730
Ctrl+C only works when something is selected
When there is NO selection, a good feature is to copy the whole line.
Thanks
Copy line under cursor if no selection - ID: 3012730
Ctrl+C only works when something is selected
When there is NO selection, a good feature is to copy the whole line.
Thanks
Code: Select all
// Same as COPY except that if the selection is empty then the current line is copied.
void CopyAllowLine(); // [IRMLAB-100615]
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);
}
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();
Code: Select all
if (event.GetId() == wxID_COPY) {
+ editor->CopyAllowLine(); // [CHANGE:100615-IRMLAB]
} else if (event.GetId() == wxID_CUT) {
editor->Cut();
Code: Select all
if (editor->GetSelectedText() == wxT(""))
+ {
+ editor->LineCopy();
Another thing I want to add: don't be afraid to provide patches. Just make sure they work post them here and CodeLite community give a final test and if all is ok I don't think it will be left unimplemented. One more thing tho, if I remember right eranif mentioned on one of the forum posts that changes to scintilla sources are to be avoided or at least mark the changes.irmlab
But since I suggested it, I would like to try it myself