mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ fix: copy multi-selection to clipboard: separate each match by line-break
This commit is contained in:
parent
a5dd9070c7
commit
46a798deec
21
src/Edit.c
21
src/Edit.c
@ -2851,6 +2851,27 @@ void EditCutLines(HWND hwnd) {
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// EditCopyMultiSelection()
|
||||
//
|
||||
void EditCopyMultiSelection(HWND hwnd) {
|
||||
|
||||
if (SciCall_IsSelectionEmpty()) {
|
||||
return;
|
||||
}
|
||||
if (Sci_IsMultiSelection()) {
|
||||
EditClearClipboard(hwnd);
|
||||
DocPosU const selCount = SciCall_GetSelections();
|
||||
for (DocPosU s = 0; s < selCount; ++s) {
|
||||
EditCopyRangeAppend(hwnd, SciCall_GetSelectionNStart(s), SciCall_GetSelectionNEnd(s), true);
|
||||
}
|
||||
} else {
|
||||
SciCall_Copy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// EditModifyLines()
|
||||
|
||||
@ -66,6 +66,7 @@ void EditMoveDown(HWND hwnd);
|
||||
bool EditSetCaretToSelectionStart();
|
||||
bool EditSetCaretToSelectionEnd();
|
||||
void EditCutLines(HWND hwnd);
|
||||
void EditCopyMultiSelection(HWND hwnd);
|
||||
void EditModifyLines(LPCWSTR pwszPrefix, LPCWSTR pwszAppend);
|
||||
void EditIndentBlock(HWND hwnd,int cmd, bool bFormatIndentation, bool bForceAll);
|
||||
void EditAlignText(int nMode);
|
||||
|
||||
@ -4393,7 +4393,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
SciCall_Copy();
|
||||
EditCopyMultiSelection(Globals.hwndEdit);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user