Fix typos (part 2)

This commit is contained in:
Don Ho 2025-05-21 17:57:33 +02:00
parent d3e846162a
commit 8696d28cfd
18 changed files with 94 additions and 96 deletions

View File

@ -905,7 +905,6 @@
<Preference title="偏好設定"> <Preference title="偏好設定">
<Item id="6001" name="儲存並關閉"/> <Item id="6001" name="儲存並關閉"/>
<Global title="一般"> <Global title="一般">
<Item id="6125" name="文件切換器"/>
<Item id="6131" name="選單"/> <Item id="6131" name="選單"/>
<Item id="6122" name="隱藏(用 Alt 或 F10 切換)"/> <Item id="6122" name="隱藏(用 Alt 或 F10 切換)"/>
<Item id="6132" name="隱藏選單中右邊的 ▼ ✕ 捷徑"/> <Item id="6132" name="隱藏選單中右邊的 ▼ ✕ 捷徑"/>

View File

@ -346,7 +346,7 @@ LRESULT Notepad_plus::init(HWND hwnd)
_mainEditView.execute(SCI_SETZOOM, svp._zoom); _mainEditView.execute(SCI_SETZOOM, svp._zoom);
_subEditView.execute(SCI_SETZOOM, svp._zoom2); _subEditView.execute(SCI_SETZOOM, svp._zoom2);
::SendMessage(hwnd, NPPM_INTERNAL_SETMULTISELCTION, 0, 0); ::SendMessage(hwnd, NPPM_INTERNAL_SETMULTISELECTION, 0, 0);
// Make backspace or delete work with multiple selections // Make backspace or delete work with multiple selections
_mainEditView.execute(SCI_SETADDITIONALSELECTIONTYPING, true); _mainEditView.execute(SCI_SETADDITIONALSELECTIONTYPING, true);
@ -5934,7 +5934,7 @@ void Notepad_plus::fullScreenToggle()
} }
} }
//Set fullscreen window, highest non-top z-order, show the window and redraw it (refreshing the windowmanager cache aswell) //Set fullscreen window, highest non-top z-order, show the window and redraw it (refreshing the windowmanager cache as well)
::ShowWindow(_pPublicInterface->getHSelf(), SW_SHOW); ::ShowWindow(_pPublicInterface->getHSelf(), SW_SHOW);
::SetWindowPos(_pPublicInterface->getHSelf(), HWND_TOP, fullscreenArea.left, fullscreenArea.top, fullscreenArea.right, fullscreenArea.bottom, SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED); ::SetWindowPos(_pPublicInterface->getHSelf(), HWND_TOP, fullscreenArea.left, fullscreenArea.top, fullscreenArea.right, fullscreenArea.bottom, SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED);
::SetForegroundWindow(_pPublicInterface->getHSelf()); ::SetForegroundWindow(_pPublicInterface->getHSelf());

View File

@ -1911,7 +1911,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
return TRUE; return TRUE;
} }
case NPPM_INTERNAL_SETMULTISELCTION: case NPPM_INTERNAL_SETMULTISELECTION:
{ {
ScintillaViewParams& svp = const_cast<ScintillaViewParams&>(nppParam.getSVP()); ScintillaViewParams& svp = const_cast<ScintillaViewParams&>(nppParam.getSVP());
_mainEditView.execute(SCI_SETMULTIPLESELECTION, svp._multiSelection); _mainEditView.execute(SCI_SETMULTIPLESELECTION, svp._multiSelection);
@ -3951,7 +3951,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
else //if (message == IDM_VIEW_SYMBOLMARGIN) else //if (message == IDM_VIEW_SYMBOLMARGIN)
margin = ScintillaEditView::_SC_MARGE_SYMBOL; margin = ScintillaEditView::_SC_MARGE_SYMBOL;
if (_mainEditView.hasMarginShowed(margin)) if (_mainEditView.hasMarginShown(margin))
{ {
_mainEditView.showMargin(margin, false); _mainEditView.showMargin(margin, false);
_subEditView.showMargin(margin, false); _subEditView.showMargin(margin, false);

View File

@ -1051,7 +1051,7 @@ struct ScintillaViewParams
unsigned char _paddingLeft = 0; // 0-9 pixel unsigned char _paddingLeft = 0; // 0-9 pixel
unsigned char _paddingRight = 0; // 0-9 pixel unsigned char _paddingRight = 0; // 0-9 pixel
// distractionFreeDivPart is used for divising the fullscreen pixel width. // distractionFreeDivPart is used for dividing the fullscreen pixel width.
// the result of division will be the left & right padding in Distraction Free mode // the result of division will be the left & right padding in Distraction Free mode
unsigned char _distractionFreeDivPart = 4; // 3-9 parts unsigned char _distractionFreeDivPart = 4; // 3-9 parts

View File

@ -434,9 +434,9 @@ bool AutoCompletion::showAutoComplete(AutocompleteType autocType, bool autoInser
_pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, _ignoreCase); _pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, _ignoreCase);
if (autocType == autocFunc) if (autocType == autocFunc)
_pEditView->showAutoComletion(curPos - startPos, _keyWords.c_str()); _pEditView->showAutoCompletion(curPos - startPos, _keyWords.c_str());
else else
_pEditView->showAutoComletion(curPos - startPos, words.c_str()); _pEditView->showAutoCompletion(curPos - startPos, words.c_str());
return true; return true;
} }
@ -657,7 +657,7 @@ void AutoCompletion::showPathCompletion()
_pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM('\n')); _pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM('\n'));
_pEditView->execute(SCI_AUTOCSETIGNORECASE, true); _pEditView->execute(SCI_AUTOCSETIGNORECASE, true);
_pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, true); _pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, true);
_pEditView->showAutoComletion(rawPath.length(), autoCompleteEntries.c_str()); _pEditView->showAutoCompletion(rawPath.length(), autoCompleteEntries.c_str());
return; return;
} }

View File

@ -250,7 +250,7 @@ bool FunctionCallTip::getCursorFunction()
bool res = false; bool res = false;
if (curValue.lastFunctionIdentifier == -1) if (curValue.lastFunctionIdentifier == -1)
{ //not in direct function. Start popping the stack untill we empty it, or a func IS found { //not in direct function. Start popping the stack until we empty it, or a func IS found
while (curValue.lastFunctionIdentifier == -1 && valueVec.size() > 0) while (curValue.lastFunctionIdentifier == -1 && valueVec.size() > 0)
{ {
curValue = valueVec.back(); curValue = valueVec.back();
@ -295,7 +295,7 @@ Find function in XML structure and parse it
bool FunctionCallTip::loadFunction() bool FunctionCallTip::loadFunction()
{ {
reset(); //set everything back to 0 reset(); //set everything back to 0
//The functions should be ordered, but linear search because we cant access like array //The functions should be ordered, but linear search because we can't access like array
_curFunction = NULL; _curFunction = NULL;
//Iterate through all keywords and find the correct function keyword //Iterate through all keywords and find the correct function keyword
TiXmlElement *funcNode = _pXmlKeyword; TiXmlElement *funcNode = _pXmlKeyword;

View File

@ -323,7 +323,7 @@ size_t Printer::doPrint(bool justDoIt)
} }
bool isShown = _pSEView->hasMarginShowed(ScintillaEditView::_SC_MARGE_LINENUMBER); bool isShown = _pSEView->hasMarginShown(ScintillaEditView::_SC_MARGE_LINENUMBER);
if (!nppGUI._printSettings._printLineNumber) if (!nppGUI._printSettings._printLineNumber)
_pSEView->showMargin(ScintillaEditView::_SC_MARGE_LINENUMBER, false); _pSEView->showMargin(ScintillaEditView::_SC_MARGE_LINENUMBER, false);

View File

@ -280,7 +280,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
execute(SCI_SETSCROLLWIDTHTRACKING, true); execute(SCI_SETSCROLLWIDTHTRACKING, true);
execute(SCI_SETSCROLLWIDTH, 1); //default empty document: override default width of 2000 execute(SCI_SETSCROLLWIDTH, 1); //default empty document: override default width of 2000
// smart hilighting // smart highlighting
execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE_SMART, INDIC_ROUNDBOX); execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE_SMART, INDIC_ROUNDBOX);
execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE, INDIC_ROUNDBOX); execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE, INDIC_ROUNDBOX);
execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE_INC, INDIC_ROUNDBOX); execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE_INC, INDIC_ROUNDBOX);
@ -378,10 +378,10 @@ LRESULT CALLBACK ScintillaEditView::scintillaStatic_Proc(HWND hwnd, UINT Message
//Hack for Synaptics TouchPad Driver //Hack for Synaptics TouchPad Driver
char synapticsHack[26]{}; char synapticsHack[26]{};
GetClassNameA(hwndOnMouse, (LPSTR)&synapticsHack, 26); GetClassNameA(hwndOnMouse, (LPSTR)&synapticsHack, 26);
bool isSynpnatic = std::string(synapticsHack) == "SynTrackCursorWindowClass"; bool isSynaptics = std::string(synapticsHack) == "SynTrackCursorWindowClass";
bool makeTouchPadCompetible = ((NppParameters::getInstance()).getSVP())._disableAdvancedScrolling; bool makeTouchPadCompatible = ((NppParameters::getInstance()).getSVP())._disableAdvancedScrolling;
if (pScint && (isSynpnatic || makeTouchPadCompetible)) if (pScint && (isSynaptics || makeTouchPadCompatible))
return (pScint->scintillaNew_Proc(hwnd, Message, wParam, lParam)); return (pScint->scintillaNew_Proc(hwnd, Message, wParam, lParam));
const ScintillaEditView* pScintillaOnMouse = reinterpret_cast<const ScintillaEditView *>(::GetWindowLongPtr(hwndOnMouse, GWLP_USERDATA)); const ScintillaEditView* pScintillaOnMouse = reinterpret_cast<const ScintillaEditView *>(::GetWindowLongPtr(hwndOnMouse, GWLP_USERDATA));
@ -428,7 +428,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
return TRUE; return TRUE;
} }
//Have to perform the scroll first, because the first/last line do not get updated untill after the scroll has been parsed //Have to perform the scroll first, because the first/last line do not get updated until after the scroll has been parsed
LRESULT scrollResult = ::CallWindowProc(_scintillaDefaultProc, hwnd, Message, wParam, lParam); LRESULT scrollResult = ::CallWindowProc(_scintillaDefaultProc, hwnd, Message, wParam, lParam);
return scrollResult; return scrollResult;
} }
@ -562,7 +562,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
size_t nbSelections = execute(SCI_GETSELECTIONS); size_t nbSelections = execute(SCI_GETSELECTIONS);
if (nbSelections > 1) // Multi-edit if (nbSelections > 1) // Multi-edit
{ {
vector<MultiCaretInfo> edgeOfEol; // parir <start, end>, pair <len2remove, selN> vector<MultiCaretInfo> edgeOfEol; // pair <start, end>, pair <len2remove, selN>
int nbCaseForScint = 0; int nbCaseForScint = 0;
for (size_t i = 0; i < nbSelections; ++i) for (size_t i = 0; i < nbSelections; ++i)
@ -834,7 +834,7 @@ void ScintillaEditView::setXmlLexer(LangType type)
setLexerFromLangID(L_XML); setLexerFromLangID(L_XML);
for (int i = 0 ; i < 4 ; ++i) for (int i = 0 ; i < 4 ; ++i)
execute(SCI_SETKEYWORDS, i, reinterpret_cast<LPARAM>(L"")); execute(SCI_SETKEYWORDS, i, reinterpret_cast<LPARAM>(""));
makeStyle(type, pKwArray); makeStyle(type, pKwArray);
@ -1800,7 +1800,7 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
ScintillaViewParams & svp = (ScintillaViewParams &)NppParameters::getInstance().getSVP(); ScintillaViewParams & svp = (ScintillaViewParams &)NppParameters::getInstance().getSVP();
if (svp._folderStyle != FOLDER_STYLE_NONE) if (svp._folderStyle != FOLDER_STYLE_NONE)
showMargin(_SC_MARGE_FOLDER, isNeededFolderMarge(typeDoc)); showMargin(_SC_MARGE_FOLDER, isNeededFolderMargin(typeDoc));
switch (typeDoc) switch (typeDoc)
{ {
@ -2181,7 +2181,7 @@ void ScintillaEditView::saveCurrentPos()
// restore current position is executed in two steps. // restore current position is executed in two steps.
// The detection wrap state done in the pre step function: // The detection wrap state done in the pre step function:
// if wrap is enabled, then _positionRestoreNeeded is activated // if wrap is enabled, then _positionRestoreNeeded is activated
// so post step function will be cakked in the next SCN_PAINTED message // so post step function will be called in the next SCN_PAINTED message
void ScintillaEditView::restoreCurrentPosPreStep() void ScintillaEditView::restoreCurrentPosPreStep()
{ {
Buffer * buf = MainFileManager.getBufferByID(_currentBufferID); Buffer * buf = MainFileManager.getBufferByID(_currentBufferID);
@ -2310,7 +2310,7 @@ void ScintillaEditView::activateBuffer(BufferID buffer, bool force)
// change the doc, this operation will decrease // change the doc, this operation will decrease
// the ref count of old current doc and increase the one of the new doc. FileManager should manage the rest // the ref count of old current doc and increase the one of the new doc. FileManager should manage the rest
// Note that the actual reference in the Buffer itself is NOT decreased, Notepad_plus does that if neccessary // Note that the actual reference in the Buffer itself is NOT decreased, Notepad_plus does that if necessary
execute(SCI_SETMODEVENTMASK, MODEVENTMASK_OFF); execute(SCI_SETMODEVENTMASK, MODEVENTMASK_OFF);
execute(SCI_SETDOCPOINTER, 0, _currentBuffer->getDocument()); execute(SCI_SETDOCPOINTER, 0, _currentBuffer->getDocument());
execute(SCI_SETMODEVENTMASK, MODEVENTMASK_ON); execute(SCI_SETMODEVENTMASK, MODEVENTMASK_ON);
@ -2410,7 +2410,7 @@ void ScintillaEditView::bufferUpdated(Buffer * buffer, int mask)
{ {
if (buffer->getNeedsLexing()) if (buffer->getNeedsLexing())
{ {
restyleBuffer(); //sets to false, this will apply to any other view aswell restyleBuffer(); //sets to false, this will apply to any other view as well
} //else nothing, otherwise infinite loop } //else nothing, otherwise infinite loop
} }
@ -2802,7 +2802,7 @@ intptr_t ScintillaEditView::searchInTarget(const wchar_t * text2Find, size_t len
return execute(SCI_SEARCHINTARGET, len, reinterpret_cast<LPARAM>(text2FindA)); return execute(SCI_SEARCHINTARGET, len, reinterpret_cast<LPARAM>(text2FindA));
} }
void ScintillaEditView::appandGenericText(const wchar_t * text2Append) const void ScintillaEditView::appendGenericText(const wchar_t * text2Append) const
{ {
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance(); WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
size_t cp = execute(SCI_GETCODEPAGE); size_t cp = execute(SCI_GETCODEPAGE);
@ -2850,7 +2850,7 @@ intptr_t ScintillaEditView::replaceTargetRegExMode(const wchar_t * re, intptr_t
return execute(SCI_REPLACETARGETRE, static_cast<WPARAM>(-1), reinterpret_cast<LPARAM>(reA)); return execute(SCI_REPLACETARGETRE, static_cast<WPARAM>(-1), reinterpret_cast<LPARAM>(reA));
} }
void ScintillaEditView::showAutoComletion(size_t lenEntered, const wchar_t* list) void ScintillaEditView::showAutoCompletion(size_t lenEntered, const wchar_t* list)
{ {
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance(); WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
size_t cp = execute(SCI_GETCODEPAGE); size_t cp = execute(SCI_GETCODEPAGE);
@ -2916,11 +2916,11 @@ void ScintillaEditView::beginOrEndSelect(bool isColumnMode)
} }
} }
void ScintillaEditView::showMargin(int whichMarge, bool willBeShowed) void ScintillaEditView::showMargin(int whichMarge, bool willBeShown)
{ {
if (whichMarge == _SC_MARGE_LINENUMBER) if (whichMarge == _SC_MARGE_LINENUMBER)
{ {
bool forcedToHide = !willBeShowed; bool forcedToHide = !willBeShown;
updateLineNumbersMargin(forcedToHide); updateLineNumbersMargin(forcedToHide);
} }
else else
@ -2932,15 +2932,15 @@ void ScintillaEditView::showMargin(int whichMarge, bool willBeShowed)
else if (whichMarge == _SC_MARGE_FOLDER) else if (whichMarge == _SC_MARGE_FOLDER)
width = dpiManager.scaleX(14); width = dpiManager.scaleX(14);
execute(SCI_SETMARGINWIDTHN, whichMarge, willBeShowed ? width : 0); execute(SCI_SETMARGINWIDTHN, whichMarge, willBeShown ? width : 0);
} }
} }
void ScintillaEditView::showChangeHistoryMargin(bool willBeShowed) void ScintillaEditView::showChangeHistoryMargin(bool willBeShown)
{ {
DPIManager& dpiManager = NppParameters::getInstance()._dpiManager; DPIManager& dpiManager = NppParameters::getInstance()._dpiManager;
int width = dpiManager.scaleX(9); int width = dpiManager.scaleX(9);
execute(SCI_SETMARGINWIDTHN, _SC_MARGE_CHANGEHISTORY, willBeShowed ? width : 0); execute(SCI_SETMARGINWIDTHN, _SC_MARGE_CHANGEHISTORY, willBeShown ? width : 0);
} }
void ScintillaEditView::updateBeginEndSelectPosition(bool is_insert, size_t position, size_t length) void ScintillaEditView::updateBeginEndSelectPosition(bool is_insert, size_t position, size_t length)
@ -3258,11 +3258,11 @@ void ScintillaEditView::performGlobalStyles()
setNpcAndCcUniEOL(npcCustomColor); setNpcAndCcUniEOL(npcCustomColor);
} }
void ScintillaEditView::showNpc(bool willBeShowed, bool isSearchResult) void ScintillaEditView::showNpc(bool willBeShown, bool isSearchResult)
{ {
const auto& svp = NppParameters::getInstance().getSVP(); const auto& svp = NppParameters::getInstance().getSVP();
if (willBeShowed) if (willBeShown)
{ {
const auto& mode = static_cast<size_t>(svp._npcMode); const auto& mode = static_cast<size_t>(svp._npcMode);
for (const auto& invChar : g_nonPrintingChars) for (const auto& invChar : g_nonPrintingChars)
@ -3293,11 +3293,11 @@ void ScintillaEditView::showNpc(bool willBeShowed, bool isSearchResult)
} }
} }
void ScintillaEditView::showCcUniEol(bool willBeShowed, bool isSearchResult) void ScintillaEditView::showCcUniEol(bool willBeShown, bool isSearchResult)
{ {
const auto& svp = NppParameters::getInstance().getSVP(); const auto& svp = NppParameters::getInstance().getSVP();
if (willBeShowed) if (willBeShown)
{ {
const auto& mode = static_cast<size_t>(svp._npcIncludeCcUniEol ? svp._npcMode : ScintillaViewParams::npcMode::abbreviation); const auto& mode = static_cast<size_t>(svp._npcIncludeCcUniEol ? svp._npcMode : ScintillaViewParams::npcMode::abbreviation);
for (const auto& invChar : g_ccUniEolChars) for (const auto& invChar : g_ccUniEolChars)
@ -3338,11 +3338,11 @@ void ScintillaEditView::showCcUniEol(bool willBeShowed, bool isSearchResult)
showEOL(isShownEol()); showEOL(isShownEol());
} }
void ScintillaEditView::showIndentGuideLine(bool willBeShowed) void ScintillaEditView::showIndentGuideLine(bool willBeShown)
{ {
auto typeDoc = _currentBuffer->getLangType(); auto typeDoc = _currentBuffer->getLangType();
const int docIndentMode = isPythonStyleIndentation(typeDoc) ? SC_IV_LOOKFORWARD : SC_IV_LOOKBOTH; const int docIndentMode = isPythonStyleIndentation(typeDoc) ? SC_IV_LOOKFORWARD : SC_IV_LOOKBOTH;
execute(SCI_SETINDENTATIONGUIDES, willBeShowed ? docIndentMode : SC_IV_NONE); execute(SCI_SETINDENTATIONGUIDES, willBeShown ? docIndentMode : SC_IV_NONE);
} }
void ScintillaEditView::setLineIndent(size_t line, size_t indent) const void ScintillaEditView::setLineIndent(size_t line, size_t indent) const
@ -3860,7 +3860,7 @@ void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, size_t initial, siz
// If there is no column mode info available, no need to do anything // If there is no column mode info available, no need to do anything
// If required a message can be shown to user, that select column properly or something similar // If required a message can be shown to user, that select column properly or something similar
// It is just a double check as taken in callee method (in case this method is called from multiple places) // It is just a double check as taken in called method (in case this method is called from multiple places)
if (cmi.size() <= 0) if (cmi.size() <= 0)
return; return;
// 0000 00 00 : Dec BASE_10 // 0000 00 00 : Dec BASE_10
@ -4088,7 +4088,7 @@ bool ScintillaEditView::hidelineMarkerClicked(intptr_t lineNumber)
if (!openPresent && !closePresent) if (!openPresent && !closePresent)
return false; return false;
//Special func on buffer. First call show with location of opening marker. Then remove the marker manually //Special function on buffer. First call show with location of opening marker. Then remove the marker manually
if (openPresent) if (openPresent)
{ {
closePresent = false; // when there are two overlapping markers, always open the lower section closePresent = false; // when there are two overlapping markers, always open the lower section
@ -4109,7 +4109,7 @@ bool ScintillaEditView::hidelineMarkerClicked(intptr_t lineNumber)
{ {
_currentBuffer->setHideLineChanged(false, i + 1); _currentBuffer->setHideLineChanged(false, i + 1);
} }
else // problem -> only close but no open: let's remove the errno close marker else // problem -> only close but no open: let's remove the erroneous close marker
{ {
execute(SCI_MARKERDELETE, lineNumber, MARK_HIDELINESEND); execute(SCI_MARKERDELETE, lineNumber, MARK_HIDELINESEND);
} }
@ -4226,7 +4226,7 @@ void ScintillaEditView::showHiddenLines(size_t searchStart, bool toEndOfDoc, boo
else if (isInSection) else if (isInSection)
{ {
if (startShowing >= i) if (startShowing >= i)
{ //because of fold skipping, we passed the close tag. In that case we cant do anything { //because of fold skipping, we passed the close tag. In that case we can't do anything
if (!toEndOfDoc) if (!toEndOfDoc)
{ {
return; return;
@ -4352,7 +4352,7 @@ void ScintillaEditView::insertNewLineBelowCurrentLine()
if (current_line == line_count - 1) if (current_line == line_count - 1)
{ {
// Special handling if caret is at last line. // Special handling if caret is at last line.
appandGenericText(newline.c_str()); appendGenericText(newline.c_str());
} }
else else
{ {

View File

@ -212,7 +212,7 @@ const std::vector<std::vector<const char*>> g_nonPrintingChars =
{"\xE2\x80\x85", "4/MSP", "U+2005"}, // U+2005 : four-per-em space {"\xE2\x80\x85", "4/MSP", "U+2005"}, // U+2005 : four-per-em space
{"\xE2\x80\x86", "6/MSP", "U+2006"}, // U+2006 : six-per-em space {"\xE2\x80\x86", "6/MSP", "U+2006"}, // U+2006 : six-per-em space
{"\xE2\x80\x87", "FSP", "U+2007"}, // U+2007 : figure space {"\xE2\x80\x87", "FSP", "U+2007"}, // U+2007 : figure space
{"\xE2\x80\x88", "PSP", "U+2008"}, // U+2008 : punctation space {"\xE2\x80\x88", "PSP", "U+2008"}, // U+2008 : punctuation space
{"\xE2\x80\x89", "THSP", "U+2009"}, // U+2009 : thin space {"\xE2\x80\x89", "THSP", "U+2009"}, // U+2009 : thin space
{"\xE2\x80\x8A", "HSP", "U+200A"}, // U+200A : hair space {"\xE2\x80\x8A", "HSP", "U+200A"}, // U+200A : hair space
{"\xE2\x80\x8B", "ZWSP", "U+200B"}, // U+200B : zero-width space {"\xE2\x80\x8B", "ZWSP", "U+200B"}, // U+200B : zero-width space
@ -472,12 +472,12 @@ public:
wchar_t * getGenericWordOnCaretPos(wchar_t * txt, int size); wchar_t * getGenericWordOnCaretPos(wchar_t * txt, int size);
wchar_t * getGenericSelectedText(wchar_t * txt, int size, bool expand = true); wchar_t * getGenericSelectedText(wchar_t * txt, int size, bool expand = true);
intptr_t searchInTarget(const wchar_t * Text2Find, size_t lenOfText2Find, size_t fromPos, size_t toPos) const; intptr_t searchInTarget(const wchar_t * Text2Find, size_t lenOfText2Find, size_t fromPos, size_t toPos) const;
void appandGenericText(const wchar_t * text2Append) const; void appendGenericText(const wchar_t * text2Append) const;
void addGenericText(const wchar_t * text2Append) const; void addGenericText(const wchar_t * text2Append) const;
void addGenericText(const wchar_t * text2Append, intptr_t* mstart, intptr_t* mend) const; void addGenericText(const wchar_t * text2Append, intptr_t* mstart, intptr_t* mend) const;
intptr_t replaceTarget(const wchar_t * str2replace, intptr_t fromTargetPos = -1, intptr_t toTargetPos = -1) const; intptr_t replaceTarget(const wchar_t * str2replace, intptr_t fromTargetPos = -1, intptr_t toTargetPos = -1) const;
intptr_t replaceTargetRegExMode(const wchar_t * re, intptr_t fromTargetPos = -1, intptr_t toTargetPos = -1) const; intptr_t replaceTargetRegExMode(const wchar_t * re, intptr_t fromTargetPos = -1, intptr_t toTargetPos = -1) const;
void showAutoComletion(size_t lenEntered, const wchar_t * list); void showAutoCompletion(size_t lenEntered, const wchar_t * list);
void showCallTip(size_t startPos, const wchar_t * def); void showCallTip(size_t startPos, const wchar_t * def);
std::wstring getLine(size_t lineNumber) const; std::wstring getLine(size_t lineNumber) const;
void getLine(size_t lineNumber, wchar_t * line, size_t lineBufferLen) const; void getLine(size_t lineNumber, wchar_t * line, size_t lineBufferLen) const;
@ -531,10 +531,10 @@ public:
static const int _SC_MARGE_FOLDER; static const int _SC_MARGE_FOLDER;
static const int _SC_MARGE_CHANGEHISTORY; static const int _SC_MARGE_CHANGEHISTORY;
void showMargin(int whichMarge, bool willBeShowed = true); void showMargin(int whichMarge, bool willBeShown = true);
void showChangeHistoryMargin(bool willBeShowed = true); void showChangeHistoryMargin(bool willBeShown = true);
bool hasMarginShowed(int witchMarge) { bool hasMarginShown(int witchMarge) {
return (execute(SCI_GETMARGINWIDTHN, witchMarge, 0) != 0); return (execute(SCI_GETMARGINWIDTHN, witchMarge, 0) != 0);
}; };
@ -586,7 +586,7 @@ public:
return (execute(SCI_GETVIEWEOL) != 0); return (execute(SCI_GETVIEWEOL) != 0);
}; };
void showNpc(bool willBeShowed = true, bool isSearchResult = false); void showNpc(bool willBeShown = true, bool isSearchResult = false);
bool isShownNpc() { bool isShownNpc() {
const auto& svp = NppParameters::getInstance().getSVP(); const auto& svp = NppParameters::getInstance().getSVP();
@ -618,25 +618,21 @@ public:
} }
} }
void showCcUniEol(bool willBeShowed = true, bool isSearchResult = false); void showCcUniEol(bool willBeShown = true, bool isSearchResult = false);
bool isShownCcUniEol() { bool isShownCcUniEol() {
const auto& svp = NppParameters::getInstance().getSVP(); const auto& svp = NppParameters::getInstance().getSVP();
return svp._ccUniEolShow; return svp._ccUniEolShow;
}; };
void showInvisibleChars(bool willBeShowed = true) { void showInvisibleChars(bool willBeShown = true) {
showNpc(willBeShowed); showNpc(willBeShown);
showCcUniEol(willBeShowed); showCcUniEol(willBeShown);
showWSAndTab(willBeShowed); showWSAndTab(willBeShown);
showEOL(willBeShowed); showEOL(willBeShown);
}; };
//bool isShownInvisibleChars() { void showIndentGuideLine(bool willBeShown = true);
// return isShownSpaceTab() && isShownEol() && isShownNpc();
//};
void showIndentGuideLine(bool willBeShowed = true);
bool isShownIndentGuide() const { bool isShownIndentGuide() const {
return (execute(SCI_GETINDENTATIONGUIDES) != 0); return (execute(SCI_GETINDENTATIONGUIDES) != 0);
@ -838,7 +834,7 @@ public:
void setHotspotStyle(const Style& styleToSet); void setHotspotStyle(const Style& styleToSet);
void setTabSettings(Lang *lang); void setTabSettings(Lang *lang);
bool isWrapRestoreNeeded() const {return _wrapRestoreNeeded;}; bool isWrapRestoreNeeded() const {return _wrapRestoreNeeded;};
void setWrapRestoreNeeded(bool isWrapRestoredNeeded) {_wrapRestoreNeeded = isWrapRestoredNeeded;}; void setWrapRestoreNeeded(bool isWrapRestoreNeeded) {_wrapRestoreNeeded = isWrapRestoreNeeded;};
bool isCJK() const { bool isCJK() const {
return ((_codepage == CP_CHINESE_TRADITIONAL) || (_codepage == CP_CHINESE_SIMPLIFIED) || return ((_codepage == CP_CHINESE_TRADITIONAL) || (_codepage == CP_CHINESE_SIMPLIFIED) ||
@ -1001,7 +997,7 @@ protected:
void setTeXLexer() { void setTeXLexer() {
for (int i = 0 ; i < 4 ; ++i) for (int i = 0 ; i < 4 ; ++i)
execute(SCI_SETKEYWORDS, i, reinterpret_cast<LPARAM>(L"")); execute(SCI_SETKEYWORDS, i, reinterpret_cast<LPARAM>(""));
setLexer(L_TEX, LIST_NONE); setLexer(L_TEX, LIST_NONE);
}; };
@ -1248,9 +1244,9 @@ protected:
void setErrorListLexer() { void setErrorListLexer() {
setLexer(L_ERRORLIST, LIST_NONE); setLexer(L_ERRORLIST, LIST_NONE);
bool do_show_escape_chars = isShownCcUniEol(); // decide based on the ControlCharacter+UnicodeEOL flag bool doShowEscapeChars = isShownCcUniEol(); // decide based on the ControlCharacter+UnicodeEOL flag
execute(SCI_STYLESETVISIBLE, static_cast<WPARAM>(SCE_ERR_ESCSEQ), static_cast<LPARAM>(do_show_escape_chars)); execute(SCI_STYLESETVISIBLE, static_cast<WPARAM>(SCE_ERR_ESCSEQ), static_cast<LPARAM>(doShowEscapeChars));
execute(SCI_STYLESETVISIBLE, static_cast<WPARAM>(SCE_ERR_ESCSEQ_UNKNOWN), static_cast<LPARAM>(do_show_escape_chars)); execute(SCI_STYLESETVISIBLE, static_cast<WPARAM>(SCE_ERR_ESCSEQ_UNKNOWN), static_cast<LPARAM>(doShowEscapeChars));
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("lexer.errorlist.value.separate"), reinterpret_cast<LPARAM>("0")); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("lexer.errorlist.value.separate"), reinterpret_cast<LPARAM>("0"));
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("lexer.errorlist.escape.sequences"), reinterpret_cast<LPARAM>("1")); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("lexer.errorlist.escape.sequences"), reinterpret_cast<LPARAM>("1"));
} }
@ -1268,7 +1264,7 @@ protected:
setLexer(L_SEARCHRESULT, LIST_NONE); setLexer(L_SEARCHRESULT, LIST_NONE);
}; };
bool isNeededFolderMarge(LangType typeDoc) const { bool isNeededFolderMargin(LangType typeDoc) const {
switch (typeDoc) switch (typeDoc)
{ {
case L_ASCII: case L_ASCII:

View File

@ -544,7 +544,7 @@ intptr_t CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM l
case WM_MOUSEWHEEL : case WM_MOUSEWHEEL :
{ {
//Have to perform the scroll first, because the first/last line do not get updated untill after the scroll has been parsed //Have to perform the scroll first, because the first/last line do not get updated until after the scroll has been parsed
::SendMessage(_hParent, DOCUMENTMAP_MOUSEWHEEL, wParam, lParam); ::SendMessage(_hParent, DOCUMENTMAP_MOUSEWHEEL, wParam, lParam);
return TRUE; return TRUE;
} }

View File

@ -34,7 +34,7 @@ BEGIN
END END
IDD_PREFERENCE_SUB_GENRAL DIALOGEX 115, 10, 460, 205 IDD_PREFERENCE_SUB_GENERAL DIALOGEX 115, 10, 460, 205
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x1 FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN BEGIN
@ -149,7 +149,7 @@ BEGIN
GROUPBOX "EOL (CRLF)",IDC_GB_STATIC_CRLF,311,3,138,59,BS_CENTER GROUPBOX "EOL (CRLF)",IDC_GB_STATIC_CRLF,311,3,138,59,BS_CENTER
CONTROL "Default",IDC_RADIO_ROUNDCORNER_CRLF,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,317,16,100,10 CONTROL "Default",IDC_RADIO_ROUNDCORNER_CRLF,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,317,16,100,10
CONTROL "Plain Text",IDC_RADIO_PLEINTEXT_CRLF,"Button",BS_AUTORADIOBUTTON,317,31,100,10 CONTROL "Plain Text",IDC_RADIO_PLAINTEXT_CRLF,"Button",BS_AUTORADIOBUTTON,317,31,100,10
CONTROL "Custom Color",IDC_CHECK_WITHCUSTOMCOLOR_CRLF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,317,47,100,10 CONTROL "Custom Color",IDC_CHECK_WITHCUSTOMCOLOR_CRLF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,317,47,100,10
PUSHBUTTON "...",IDC_BUTTON_LAUNCHSTYLECONF_CRLF,429,44,16,14 PUSHBUTTON "...",IDC_BUTTON_LAUNCHSTYLECONF_CRLF,429,44,16,14

View File

@ -121,7 +121,7 @@ intptr_t CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
case WM_INITDIALOG : case WM_INITDIALOG :
{ {
_generalSubDlg.init(_hInst, _hSelf); _generalSubDlg.init(_hInst, _hSelf);
_generalSubDlg.create(IDD_PREFERENCE_SUB_GENRAL, false, false); _generalSubDlg.create(IDD_PREFERENCE_SUB_GENERAL, false, false);
_generalSubDlg.display(); _generalSubDlg.display();
_toolbarSubDlg.init(_hInst, _hSelf); _toolbarSubDlg.init(_hInst, _hSelf);
@ -301,7 +301,7 @@ intptr_t CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
return TRUE; return TRUE;
} }
case NPPM_INTERNAL_SETTOOLICONSSET: // Set icons set only option (checkbox) on general sub-dialog, the remained real operations will be done in NppDarkMode::refreshDarkMode case NPPM_INTERNAL_SETTOOLICONSSET: // Set icons set only option (checkbox) on general sub-dialog, the remaining real operations will be done in NppDarkMode::refreshDarkMode
{ {
NppParameters& nppParams = NppParameters::getInstance(); NppParameters& nppParams = NppParameters::getInstance();
NppGUI& nppGUI = nppParams.getNppGUI(); NppGUI& nppGUI = nppParams.getNppGUI();
@ -642,7 +642,7 @@ intptr_t CALLBACK GeneralSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
pair<wstring, wstring> localizationInfo = localizationSwitcher.getElementFromIndex(i); pair<wstring, wstring> localizationInfo = localizationSwitcher.getElementFromIndex(i);
::SendDlgItemMessage(_hSelf, IDC_COMBO_LOCALIZATION, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(localizationInfo.first.c_str())); ::SendDlgItemMessage(_hSelf, IDC_COMBO_LOCALIZATION, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(localizationInfo.first.c_str()));
} }
wstring lang = L"English"; // Set default language as Englishs wstring lang = L"English"; // Set default language as English
if (nppParam.getNativeLangA()) // if nativeLangA is not NULL, then we can be sure the default language (English) is not used if (nppParam.getNativeLangA()) // if nativeLangA is not NULL, then we can be sure the default language (English) is not used
{ {
string fn = localizationSwitcher.getFileName(); string fn = localizationSwitcher.getFileName();
@ -1326,8 +1326,8 @@ intptr_t CALLBACK TabbarSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
case IDC_CHECK_LOCK: case IDC_CHECK_LOCK:
{ {
bool islocked = isCheckedOrNot(IDC_CHECK_LOCK); bool isLocked = isCheckedOrNot(IDC_CHECK_LOCK);
if (islocked) if (isLocked)
nppGUI._tabStatus &= ~TAB_DRAGNDROP; nppGUI._tabStatus &= ~TAB_DRAGNDROP;
else else
nppGUI._tabStatus |= TAB_DRAGNDROP; nppGUI._tabStatus |= TAB_DRAGNDROP;
@ -1542,12 +1542,12 @@ static LRESULT CALLBACK editNumSpaceProc(HWND hwnd, UINT message, WPARAM wParam,
bool shift = GetKeyState(VK_SHIFT) & 0x8000; bool shift = GetKeyState(VK_SHIFT) & 0x8000;
bool ctrl_V = (!shift && ctrl && !alt && wParam == 'V'); bool ctrl_V = (!shift && ctrl && !alt && wParam == 'V');
bool shif_INS = (shift && !ctrl && !alt && wParam == VK_INSERT); bool shift_INS = (shift && !ctrl && !alt && wParam == VK_INSERT);
if ( ctrl_V || shif_INS) if ( ctrl_V || shift_INS)
{ {
canPaste = hasOnlyNumSpaceInClipboard(); canPaste = hasOnlyNumSpaceInClipboard();
if (shif_INS && !canPaste) // Shift-INS is different from Ctrl-V, it doesn't pass by WM_CHAR afterward, so we stop here if (shift_INS && !canPaste) // Shift-INS is different from Ctrl-V, it doesn't pass by WM_CHAR afterward, so we stop here
return TRUE; return TRUE;
} }
} }
@ -1568,7 +1568,7 @@ static LRESULT CALLBACK editNumSpaceProc(HWND hwnd, UINT message, WPARAM wParam,
if (ctrl_V_in_WM_CHAR) if (ctrl_V_in_WM_CHAR)
{ {
if (!canPaste) // it's come from ctl_v of WM_KEYDOWN: the format is not correct or nothing to paste, so stop here if (!canPaste) // it comes from Ctrl-V of WM_KEYDOWN: the format is not correct or nothing to paste, so stop here
{ {
return TRUE; return TRUE;
} }
@ -1583,7 +1583,7 @@ static LRESULT CALLBACK editNumSpaceProc(HWND hwnd, UINT message, WPARAM wParam,
} }
else else
{ {
if (wParam != VK_BACK && wParam != ' ' && (wParam < '0' || wParam > '9')) // If input char is not number either white space, stop here if (wParam != VK_BACK && wParam != ' ' && (wParam < '0' || wParam > '9')) // If input char is not number or white space, stop here
{ {
return TRUE; return TRUE;
} }
@ -1800,7 +1800,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
NppParameters& nppParam = NppParameters::getInstance(); NppParameters& nppParam = NppParameters::getInstance();
ScintillaViewParams& svp = const_cast<ScintillaViewParams&>(nppParam.getSVP()); ScintillaViewParams& svp = const_cast<ScintillaViewParams&>(nppParam.getSVP());
// defaul => (svp._eolMode == svp.roundedRectangleText) // default => (svp._eolMode == svp.roundedRectangleText)
bool checkDefaultCRLF = true; bool checkDefaultCRLF = true;
bool checkPlainTextCRLF = false; bool checkPlainTextCRLF = false;
bool checkWithColorCRLF = false; bool checkWithColorCRLF = false;
@ -1824,7 +1824,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
checkWithColorCRLF = true; checkWithColorCRLF = true;
} }
::SendDlgItemMessage(_hSelf, IDC_RADIO_ROUNDCORNER_CRLF, BM_SETCHECK, checkDefaultCRLF, 0); ::SendDlgItemMessage(_hSelf, IDC_RADIO_ROUNDCORNER_CRLF, BM_SETCHECK, checkDefaultCRLF, 0);
::SendDlgItemMessage(_hSelf, IDC_RADIO_PLEINTEXT_CRLF, BM_SETCHECK, checkPlainTextCRLF, 0); ::SendDlgItemMessage(_hSelf, IDC_RADIO_PLAINTEXT_CRLF, BM_SETCHECK, checkPlainTextCRLF, 0);
::SendDlgItemMessage(_hSelf, IDC_CHECK_WITHCUSTOMCOLOR_CRLF, BM_SETCHECK, checkWithColorCRLF, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_WITHCUSTOMCOLOR_CRLF, BM_SETCHECK, checkWithColorCRLF, 0);
@ -1938,7 +1938,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
} }
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING), svp._multiSelection); ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING), svp._multiSelection);
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SETMULTISELCTION, 0, 0); ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SETMULTISELECTION, 0, 0);
} }
return TRUE; return TRUE;
@ -1949,7 +1949,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
return TRUE; return TRUE;
case IDC_RADIO_ROUNDCORNER_CRLF: case IDC_RADIO_ROUNDCORNER_CRLF:
case IDC_RADIO_PLEINTEXT_CRLF: case IDC_RADIO_PLAINTEXT_CRLF:
case IDC_CHECK_WITHCUSTOMCOLOR_CRLF: case IDC_CHECK_WITHCUSTOMCOLOR_CRLF:
{ {
bool doCustomColor = isCheckedOrNot(IDC_CHECK_WITHCUSTOMCOLOR_CRLF); bool doCustomColor = isCheckedOrNot(IDC_CHECK_WITHCUSTOMCOLOR_CRLF);
@ -1958,7 +1958,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
{ {
svp._eolMode = doCustomColor ? svp.roundedRectangleTextCustomColor : svp.roundedRectangleText; svp._eolMode = doCustomColor ? svp.roundedRectangleTextCustomColor : svp.roundedRectangleText;
} }
else if (wParam == IDC_RADIO_PLEINTEXT_CRLF) else if (wParam == IDC_RADIO_PLAINTEXT_CRLF)
{ {
svp._eolMode = doCustomColor ? svp.plainTextCustomColor : svp.plainText; svp._eolMode = doCustomColor ? svp.plainTextCustomColor : svp.plainText;
} }
@ -1968,7 +1968,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
{ {
svp._eolMode = doCustomColor ? svp.roundedRectangleTextCustomColor : svp.roundedRectangleText; svp._eolMode = doCustomColor ? svp.roundedRectangleTextCustomColor : svp.roundedRectangleText;
} }
else // IDC_RADIO_PLEINTEXT_CRLF else // IDC_RADIO_PLAINTEXT_CRLF
{ {
svp._eolMode = doCustomColor ? svp.plainTextCustomColor : svp.plainText; svp._eolMode = doCustomColor ? svp.plainTextCustomColor : svp.plainText;
} }
@ -2398,7 +2398,7 @@ intptr_t CALLBACK DarkModeSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
doEnableCustomizedColorCtrls = enableDarkMode && nppGUI._darkmode._colorTone == NppDarkMode::customizedTone; doEnableCustomizedColorCtrls = enableDarkMode && nppGUI._darkmode._colorTone == NppDarkMode::customizedTone;
enableCustomizedColorCtrls(doEnableCustomizedColorCtrls); enableCustomizedColorCtrls(doEnableCustomizedColorCtrls);
::SendMessage(_hParent, NPPM_INTERNAL_SETTOOLICONSSET, static_cast<WPARAM>(enableDarkMode), 0); // Set icons set only option (checkbox) on general sub-dialog, the remained real operations will be done in NppDarkMode::refreshDarkMode ::SendMessage(_hParent, NPPM_INTERNAL_SETTOOLICONSSET, static_cast<WPARAM>(enableDarkMode), 0); // Set icons set only option (checkbox) on general sub-dialog, the remaining real operations will be done in NppDarkMode::refreshDarkMode
changed = true; changed = true;
} }

View File

@ -42,7 +42,7 @@
#define IDD_PREFERENCE_SUB_TABBAR 6040 #define IDD_PREFERENCE_SUB_TABBAR 6040
#define IDD_PREFERENCE_SUB_GENRAL 6100 #define IDD_PREFERENCE_SUB_GENERAL 6100
#define IDC_CHECK_HIDE 6102 #define IDC_CHECK_HIDE 6102
#define IDC_RADIO_SMALLICON 6103 #define IDC_RADIO_SMALLICON 6103
@ -174,7 +174,7 @@
#define IDC_GB_STATIC_CRLF 6247 #define IDC_GB_STATIC_CRLF 6247
#define IDC_RADIO_ROUNDCORNER_CRLF 6248 #define IDC_RADIO_ROUNDCORNER_CRLF 6248
#define IDC_RADIO_PLEINTEXT_CRLF 6249 #define IDC_RADIO_PLAINTEXT_CRLF 6249
#define IDC_CHECK_WITHCUSTOMCOLOR_CRLF 6250 #define IDC_CHECK_WITHCUSTOMCOLOR_CRLF 6250
#define IDC_BUTTON_LAUNCHSTYLECONF_CRLF 6251 #define IDC_BUTTON_LAUNCHSTYLECONF_CRLF 6251

View File

@ -57,7 +57,7 @@ void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize, double iSpli
{ {
if (iSplitRatio >= 100) if (iSplitRatio >= 100)
{ {
//cant be 100 % or more //can't be 100 % or more
throw std::runtime_error("Splitter::init : Parameter iSplitRatio shoulds be 0 < ratio < 100"); throw std::runtime_error("Splitter::init : Parameter iSplitRatio shoulds be 0 < ratio < 100");
} }
} }

View File

@ -852,7 +852,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
return TRUE; return TRUE;
} }
case WM_RBUTTONDOWN : //rightclick selects tab aswell case WM_RBUTTONDOWN : //rightclick selects tab as well
{ {
// TCS_BUTTONS doesn't select the tab // TCS_BUTTONS doesn't select the tab
if (::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS) if (::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS)

View File

@ -28,16 +28,19 @@ trayIconControler::trayIconControler(HWND hwnd, UINT uID, UINT uCBMsg, HICON hic
wcscpy_s(_nid.szTip, tip); wcscpy_s(_nid.szTip, tip);
::RegisterWindowMessage(L"TaskbarCreated"); ::RegisterWindowMessage(L"TaskbarCreated");
_isIconShowed = false; _isIconShown = false;
} }
int trayIconControler::doTrayIcon(DWORD op) int trayIconControler::doTrayIcon(DWORD op)
{ {
if ((op != ADD)&&(op != REMOVE)) return INCORRECT_OPERATION; if (op != ADD && op != REMOVE)
if (((_isIconShowed)&&(op == ADD))||((!_isIconShowed)&&(op == REMOVE))) return INCORRECT_OPERATION;
if ((_isIconShown && op == ADD) || (!_isIconShown && op == REMOVE))
return OPERATION_INCOHERENT; return OPERATION_INCOHERENT;
::Shell_NotifyIcon(op, &_nid); ::Shell_NotifyIcon(op, &_nid);
_isIconShowed = !_isIconShowed; _isIconShown = !_isIconShown;
return 0; return 0;
} }

View File

@ -31,10 +31,10 @@ class trayIconControler
public: public:
trayIconControler(HWND hwnd, UINT uID, UINT uCBMsg, HICON hicon, const wchar_t *tip); trayIconControler(HWND hwnd, UINT uID, UINT uCBMsg, HICON hicon, const wchar_t *tip);
int doTrayIcon(DWORD op); int doTrayIcon(DWORD op);
bool isInTray() const {return _isIconShowed;}; bool isInTray() const {return _isIconShown;};
private: private:
NOTIFYICONDATA _nid; NOTIFYICONDATA _nid;
bool _isIconShowed = false; bool _isIconShown = false;
}; };

View File

@ -671,7 +671,7 @@
#define NPPM_INTERNAL_SETTOOLICONSSET (NOTEPADPLUS_USER_INTERNAL + 30) #define NPPM_INTERNAL_SETTOOLICONSSET (NOTEPADPLUS_USER_INTERNAL + 30)
#define NPPM_INTERNAL_RELOADSTYLERS (NOTEPADPLUS_USER_INTERNAL + 31) #define NPPM_INTERNAL_RELOADSTYLERS (NOTEPADPLUS_USER_INTERNAL + 31)
#define NPPM_INTERNAL_DOCORDERCHANGED (NOTEPADPLUS_USER_INTERNAL + 32) #define NPPM_INTERNAL_DOCORDERCHANGED (NOTEPADPLUS_USER_INTERNAL + 32)
#define NPPM_INTERNAL_SETMULTISELCTION (NOTEPADPLUS_USER_INTERNAL + 33) #define NPPM_INTERNAL_SETMULTISELECTION (NOTEPADPLUS_USER_INTERNAL + 33)
#define NPPM_INTERNAL_SCINTILLAFINDEROPENALL (NOTEPADPLUS_USER_INTERNAL + 34) #define NPPM_INTERNAL_SCINTILLAFINDEROPENALL (NOTEPADPLUS_USER_INTERNAL + 34)
#define NPPM_INTERNAL_RECENTFILELIST_UPDATE (NOTEPADPLUS_USER_INTERNAL + 35) #define NPPM_INTERNAL_RECENTFILELIST_UPDATE (NOTEPADPLUS_USER_INTERNAL + 35)
#define NPPM_INTERNAL_RECENTFILELIST_SWITCH (NOTEPADPLUS_USER_INTERNAL + 36) #define NPPM_INTERNAL_RECENTFILELIST_SWITCH (NOTEPADPLUS_USER_INTERNAL + 36)