mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
add: [Settings2]CopyMultiSelectionSeparator= config
This commit is contained in:
parent
1c576a76e4
commit
3cc9919929
@ -24,6 +24,7 @@ SettingsVersion=5
|
||||
;NoCGIGuess=0
|
||||
;NoCopyLineOnEmptySelection=0
|
||||
;NoCutLineOnEmptySelection=0
|
||||
;CopyMultiSelectionSeparator= ;(-> <use current EOL>) {use empty value for no separator}
|
||||
;NoFadeHidden=0
|
||||
;NoFileVariables=0
|
||||
;NoHTMLGuess=0
|
||||
|
||||
@ -1457,6 +1457,9 @@ void LoadSettings()
|
||||
}
|
||||
}
|
||||
|
||||
IniSectionGetString(IniSecSettings2, L"CopyMultiSelectionSeparator", L"\x01",
|
||||
Settings2.CopyMultiSelectionSeparator, COUNTOF(Settings2.CopyMultiSelectionSeparator));
|
||||
|
||||
for (int i = 0; i < COUNTOF(Settings2.CodeFontPrefPrioList); ++i) {
|
||||
if (i < COUNTOF(g_CodeFontPrioList))
|
||||
Settings2.CodeFontPrefPrioList[i] = g_CodeFontPrioList[i];
|
||||
|
||||
16
src/Edit.c
16
src/Edit.c
@ -3322,9 +3322,19 @@ void EditCopyMultiSelection(HWND hwnd)
|
||||
return;
|
||||
}
|
||||
if (Sci_IsMultiSelection()) {
|
||||
char pchSep[3] = { '\0' };
|
||||
Sci_GetCurrentEOL_A(pchSep);
|
||||
SciCall_SetCopySeparator(pchSep);
|
||||
if (Settings2.CopyMultiSelectionSeparator[0] == L'\x01') {
|
||||
// not set → use current EOL
|
||||
char pchSep[3] = { '\0' };
|
||||
Sci_GetCurrentEOL_A(pchSep);
|
||||
SciCall_SetCopySeparator(pchSep);
|
||||
} else {
|
||||
// use configured separator (may be empty)
|
||||
char chSep[MICRO_BUFFER * 2] = { '\0' };
|
||||
WideCharToMultiByte(Encoding_SciCP, 0,
|
||||
Settings2.CopyMultiSelectionSeparator, -1,
|
||||
chSep, COUNTOF(chSep), NULL, NULL);
|
||||
SciCall_SetCopySeparator(chSep);
|
||||
}
|
||||
}
|
||||
SciCall_Copy();
|
||||
}
|
||||
|
||||
@ -832,6 +832,8 @@ typedef struct SETTINGS2_T {
|
||||
|
||||
WCHAR HyperlinkFileProtocolVerb[MICRO_BUFFER];
|
||||
|
||||
WCHAR CopyMultiSelectionSeparator[MICRO_BUFFER];
|
||||
|
||||
const WCHAR* CodeFontPrefPrioList[MICRO_BUFFER];
|
||||
const WCHAR* TextFontPrefPrioList[MICRO_BUFFER];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user