mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-21 12:54:42 +02:00
Fix Word char list bug
Fix custom word char list doesn't take effect after relauching Notepad++.
This commit is contained in:
parent
e3f1a31a51
commit
754b92871d
@ -6692,14 +6692,6 @@ void Notepad_plus::restoreDefaultWordChars()
|
|||||||
_subEditView.execute(SCI_SETWORDCHARS, 0, reinterpret_cast<LPARAM>(nppGUI._defaultWordChars.c_str()));
|
_subEditView.execute(SCI_SETWORDCHARS, 0, reinterpret_cast<LPARAM>(nppGUI._defaultWordChars.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notepad_plus::setCustomWordChars()
|
|
||||||
{
|
|
||||||
NppParameters *pNppParam = NppParameters::getInstance();
|
|
||||||
const NppGUI & nppGUI = pNppParam->getNppGUI();
|
|
||||||
_mainEditView.execute(SCI_SETWORDCHARS, 0, reinterpret_cast<LPARAM>(nppGUI._customWordChars.c_str()));
|
|
||||||
_subEditView.execute(SCI_SETWORDCHARS, 0, reinterpret_cast<LPARAM>(nppGUI._customWordChars.c_str()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Notepad_plus::addCustomWordChars()
|
void Notepad_plus::addCustomWordChars()
|
||||||
{
|
{
|
||||||
NppParameters *pNppParam = NppParameters::getInstance();
|
NppParameters *pNppParam = NppParameters::getInstance();
|
||||||
|
@ -574,7 +574,6 @@ private:
|
|||||||
void retrieveDefaultWordChars(std::string & charList);
|
void retrieveDefaultWordChars(std::string & charList);
|
||||||
void addCustomWordChars();
|
void addCustomWordChars();
|
||||||
void restoreDefaultWordChars();
|
void restoreDefaultWordChars();
|
||||||
void setCustomWordChars();
|
|
||||||
|
|
||||||
static int getRandomNumber(int rangeMax = -1)
|
static int getRandomNumber(int rangeMax = -1)
|
||||||
{
|
{
|
||||||
|
@ -294,6 +294,9 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin
|
|||||||
// Lauch backup task
|
// Lauch backup task
|
||||||
_notepad_plus_plus_core.launchDocumentBackupTask();
|
_notepad_plus_plus_core.launchDocumentBackupTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make this call later to take effect
|
||||||
|
::SendMessage(_hSelf, NPPM_INTERNAL_SETWORDCHARS, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3158,6 +3158,7 @@ INT_PTR CALLBACK DelimiterSettingsDlg::run_dlgProc(UINT message, WPARAM wParam,
|
|||||||
::GetDlgItemTextA(_hSelf, IDC_WORDCHAR_CUSTOM_EDIT, customText, MAX_PATH-1);
|
::GetDlgItemTextA(_hSelf, IDC_WORDCHAR_CUSTOM_EDIT, customText, MAX_PATH-1);
|
||||||
nppGUI._customWordChars = customText;
|
nppGUI._customWordChars = customText;
|
||||||
setWarningIfNeed();
|
setWarningIfNeed();
|
||||||
|
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SETWORDCHARS, 0, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,17 +377,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
|||||||
else if (::IsIconic(hNotepad_plus))
|
else if (::IsIconic(hNotepad_plus))
|
||||||
sw = SW_RESTORE;
|
sw = SW_RESTORE;
|
||||||
|
|
||||||
/* REMOVED
|
|
||||||
else
|
|
||||||
sw = SW_SHOW;
|
|
||||||
|
|
||||||
// IMPORTANT !!!
|
|
||||||
::ShowWindow(hNotepad_plus, sw);
|
|
||||||
DEVOMER*/
|
|
||||||
/* ADDED */
|
|
||||||
if (sw != 0)
|
if (sw != 0)
|
||||||
::ShowWindow(hNotepad_plus, sw);
|
::ShowWindow(hNotepad_plus, sw);
|
||||||
/* DEDDA */
|
|
||||||
::SetForegroundWindow(hNotepad_plus);
|
::SetForegroundWindow(hNotepad_plus);
|
||||||
|
|
||||||
if (params.size() > 0) //if there are files to open, use the WM_COPYDATA system
|
if (params.size() > 0) //if there are files to open, use the WM_COPYDATA system
|
||||||
|
Loading…
x
Reference in New Issue
Block a user