mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 22:04:55 +02:00
Fix typos (part 2)
This commit is contained in:
parent
d3e846162a
commit
8696d28cfd
@ -905,7 +905,6 @@
|
||||
<Preference title="偏好設定">
|
||||
<Item id="6001" name="儲存並關閉"/>
|
||||
<Global title="一般">
|
||||
<Item id="6125" name="文件切換器"/>
|
||||
<Item id="6131" name="選單"/>
|
||||
<Item id="6122" name="隱藏(用 Alt 或 F10 切換)"/>
|
||||
<Item id="6132" name="隱藏選單中右邊的 + ▼ ✕ 捷徑"/>
|
||||
|
@ -346,7 +346,7 @@ LRESULT Notepad_plus::init(HWND hwnd)
|
||||
_mainEditView.execute(SCI_SETZOOM, svp._zoom);
|
||||
_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
|
||||
_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);
|
||||
::SetWindowPos(_pPublicInterface->getHSelf(), HWND_TOP, fullscreenArea.left, fullscreenArea.top, fullscreenArea.right, fullscreenArea.bottom, SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
||||
::SetForegroundWindow(_pPublicInterface->getHSelf());
|
||||
|
@ -1911,7 +1911,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case NPPM_INTERNAL_SETMULTISELCTION:
|
||||
case NPPM_INTERNAL_SETMULTISELECTION:
|
||||
{
|
||||
ScintillaViewParams& svp = const_cast<ScintillaViewParams&>(nppParam.getSVP());
|
||||
_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)
|
||||
margin = ScintillaEditView::_SC_MARGE_SYMBOL;
|
||||
|
||||
if (_mainEditView.hasMarginShowed(margin))
|
||||
if (_mainEditView.hasMarginShown(margin))
|
||||
{
|
||||
_mainEditView.showMargin(margin, false);
|
||||
_subEditView.showMargin(margin, false);
|
||||
|
@ -1051,7 +1051,7 @@ struct ScintillaViewParams
|
||||
unsigned char _paddingLeft = 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
|
||||
unsigned char _distractionFreeDivPart = 4; // 3-9 parts
|
||||
|
||||
|
@ -434,9 +434,9 @@ bool AutoCompletion::showAutoComplete(AutocompleteType autocType, bool autoInser
|
||||
_pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, _ignoreCase);
|
||||
|
||||
if (autocType == autocFunc)
|
||||
_pEditView->showAutoComletion(curPos - startPos, _keyWords.c_str());
|
||||
_pEditView->showAutoCompletion(curPos - startPos, _keyWords.c_str());
|
||||
else
|
||||
_pEditView->showAutoComletion(curPos - startPos, words.c_str());
|
||||
_pEditView->showAutoCompletion(curPos - startPos, words.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -657,7 +657,7 @@ void AutoCompletion::showPathCompletion()
|
||||
_pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM('\n'));
|
||||
_pEditView->execute(SCI_AUTOCSETIGNORECASE, true);
|
||||
_pEditView->execute(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, true);
|
||||
_pEditView->showAutoComletion(rawPath.length(), autoCompleteEntries.c_str());
|
||||
_pEditView->showAutoCompletion(rawPath.length(), autoCompleteEntries.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ bool FunctionCallTip::getCursorFunction()
|
||||
bool res = false;
|
||||
|
||||
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)
|
||||
{
|
||||
curValue = valueVec.back();
|
||||
@ -295,7 +295,7 @@ Find function in XML structure and parse it
|
||||
bool FunctionCallTip::loadFunction()
|
||||
{
|
||||
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;
|
||||
//Iterate through all keywords and find the correct function keyword
|
||||
TiXmlElement *funcNode = _pXmlKeyword;
|
||||
|
@ -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)
|
||||
_pSEView->showMargin(ScintillaEditView::_SC_MARGE_LINENUMBER, false);
|
||||
|
||||
|
@ -280,7 +280,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
||||
execute(SCI_SETSCROLLWIDTHTRACKING, true);
|
||||
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, 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
|
||||
char synapticsHack[26]{};
|
||||
GetClassNameA(hwndOnMouse, (LPSTR)&synapticsHack, 26);
|
||||
bool isSynpnatic = std::string(synapticsHack) == "SynTrackCursorWindowClass";
|
||||
bool makeTouchPadCompetible = ((NppParameters::getInstance()).getSVP())._disableAdvancedScrolling;
|
||||
bool isSynaptics = std::string(synapticsHack) == "SynTrackCursorWindowClass";
|
||||
bool makeTouchPadCompatible = ((NppParameters::getInstance()).getSVP())._disableAdvancedScrolling;
|
||||
|
||||
if (pScint && (isSynpnatic || makeTouchPadCompetible))
|
||||
if (pScint && (isSynaptics || makeTouchPadCompatible))
|
||||
return (pScint->scintillaNew_Proc(hwnd, Message, wParam, lParam));
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//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);
|
||||
return scrollResult;
|
||||
}
|
||||
@ -562,7 +562,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
||||
size_t nbSelections = execute(SCI_GETSELECTIONS);
|
||||
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;
|
||||
|
||||
for (size_t i = 0; i < nbSelections; ++i)
|
||||
@ -834,7 +834,7 @@ void ScintillaEditView::setXmlLexer(LangType type)
|
||||
setLexerFromLangID(L_XML);
|
||||
|
||||
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);
|
||||
|
||||
@ -1800,7 +1800,7 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
||||
|
||||
ScintillaViewParams & svp = (ScintillaViewParams &)NppParameters::getInstance().getSVP();
|
||||
if (svp._folderStyle != FOLDER_STYLE_NONE)
|
||||
showMargin(_SC_MARGE_FOLDER, isNeededFolderMarge(typeDoc));
|
||||
showMargin(_SC_MARGE_FOLDER, isNeededFolderMargin(typeDoc));
|
||||
|
||||
switch (typeDoc)
|
||||
{
|
||||
@ -2181,7 +2181,7 @@ void ScintillaEditView::saveCurrentPos()
|
||||
// restore current position is executed in two steps.
|
||||
// The detection wrap state done in the pre step function:
|
||||
// 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()
|
||||
{
|
||||
Buffer * buf = MainFileManager.getBufferByID(_currentBufferID);
|
||||
@ -2310,7 +2310,7 @@ void ScintillaEditView::activateBuffer(BufferID buffer, bool force)
|
||||
|
||||
// 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
|
||||
// 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_SETDOCPOINTER, 0, _currentBuffer->getDocument());
|
||||
execute(SCI_SETMODEVENTMASK, MODEVENTMASK_ON);
|
||||
@ -2410,7 +2410,7 @@ void ScintillaEditView::bufferUpdated(Buffer * buffer, int mask)
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
@ -2802,7 +2802,7 @@ intptr_t ScintillaEditView::searchInTarget(const wchar_t * text2Find, size_t len
|
||||
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();
|
||||
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));
|
||||
}
|
||||
|
||||
void ScintillaEditView::showAutoComletion(size_t lenEntered, const wchar_t* list)
|
||||
void ScintillaEditView::showAutoCompletion(size_t lenEntered, const wchar_t* list)
|
||||
{
|
||||
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
|
||||
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)
|
||||
{
|
||||
bool forcedToHide = !willBeShowed;
|
||||
bool forcedToHide = !willBeShown;
|
||||
updateLineNumbersMargin(forcedToHide);
|
||||
}
|
||||
else
|
||||
@ -2932,15 +2932,15 @@ void ScintillaEditView::showMargin(int whichMarge, bool willBeShowed)
|
||||
else if (whichMarge == _SC_MARGE_FOLDER)
|
||||
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;
|
||||
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)
|
||||
@ -3258,11 +3258,11 @@ void ScintillaEditView::performGlobalStyles()
|
||||
setNpcAndCcUniEOL(npcCustomColor);
|
||||
}
|
||||
|
||||
void ScintillaEditView::showNpc(bool willBeShowed, bool isSearchResult)
|
||||
void ScintillaEditView::showNpc(bool willBeShown, bool isSearchResult)
|
||||
{
|
||||
const auto& svp = NppParameters::getInstance().getSVP();
|
||||
|
||||
if (willBeShowed)
|
||||
if (willBeShown)
|
||||
{
|
||||
const auto& mode = static_cast<size_t>(svp._npcMode);
|
||||
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();
|
||||
|
||||
if (willBeShowed)
|
||||
if (willBeShown)
|
||||
{
|
||||
const auto& mode = static_cast<size_t>(svp._npcIncludeCcUniEol ? svp._npcMode : ScintillaViewParams::npcMode::abbreviation);
|
||||
for (const auto& invChar : g_ccUniEolChars)
|
||||
@ -3338,11 +3338,11 @@ void ScintillaEditView::showCcUniEol(bool willBeShowed, bool isSearchResult)
|
||||
showEOL(isShownEol());
|
||||
}
|
||||
|
||||
void ScintillaEditView::showIndentGuideLine(bool willBeShowed)
|
||||
void ScintillaEditView::showIndentGuideLine(bool willBeShown)
|
||||
{
|
||||
auto typeDoc = _currentBuffer->getLangType();
|
||||
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
|
||||
@ -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 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)
|
||||
return;
|
||||
// 0000 00 00 : Dec BASE_10
|
||||
@ -4088,7 +4088,7 @@ bool ScintillaEditView::hidelineMarkerClicked(intptr_t lineNumber)
|
||||
if (!openPresent && !closePresent)
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@ -4226,7 +4226,7 @@ void ScintillaEditView::showHiddenLines(size_t searchStart, bool toEndOfDoc, boo
|
||||
else if (isInSection)
|
||||
{
|
||||
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)
|
||||
{
|
||||
return;
|
||||
@ -4352,7 +4352,7 @@ void ScintillaEditView::insertNewLineBelowCurrentLine()
|
||||
if (current_line == line_count - 1)
|
||||
{
|
||||
// Special handling if caret is at last line.
|
||||
appandGenericText(newline.c_str());
|
||||
appendGenericText(newline.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -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\x86", "6/MSP", "U+2006"}, // U+2006 : six-per-em 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\x8A", "HSP", "U+200A"}, // U+200A : hair 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 * 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;
|
||||
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, 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 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);
|
||||
std::wstring getLine(size_t lineNumber) 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_CHANGEHISTORY;
|
||||
|
||||
void showMargin(int whichMarge, bool willBeShowed = true);
|
||||
void showChangeHistoryMargin(bool willBeShowed = true);
|
||||
void showMargin(int whichMarge, bool willBeShown = true);
|
||||
void showChangeHistoryMargin(bool willBeShown = true);
|
||||
|
||||
bool hasMarginShowed(int witchMarge) {
|
||||
bool hasMarginShown(int witchMarge) {
|
||||
return (execute(SCI_GETMARGINWIDTHN, witchMarge, 0) != 0);
|
||||
};
|
||||
|
||||
@ -586,7 +586,7 @@ public:
|
||||
return (execute(SCI_GETVIEWEOL) != 0);
|
||||
};
|
||||
|
||||
void showNpc(bool willBeShowed = true, bool isSearchResult = false);
|
||||
void showNpc(bool willBeShown = true, bool isSearchResult = false);
|
||||
|
||||
bool isShownNpc() {
|
||||
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() {
|
||||
const auto& svp = NppParameters::getInstance().getSVP();
|
||||
return svp._ccUniEolShow;
|
||||
};
|
||||
|
||||
void showInvisibleChars(bool willBeShowed = true) {
|
||||
showNpc(willBeShowed);
|
||||
showCcUniEol(willBeShowed);
|
||||
showWSAndTab(willBeShowed);
|
||||
showEOL(willBeShowed);
|
||||
void showInvisibleChars(bool willBeShown = true) {
|
||||
showNpc(willBeShown);
|
||||
showCcUniEol(willBeShown);
|
||||
showWSAndTab(willBeShown);
|
||||
showEOL(willBeShown);
|
||||
};
|
||||
|
||||
//bool isShownInvisibleChars() {
|
||||
// return isShownSpaceTab() && isShownEol() && isShownNpc();
|
||||
//};
|
||||
|
||||
void showIndentGuideLine(bool willBeShowed = true);
|
||||
void showIndentGuideLine(bool willBeShown = true);
|
||||
|
||||
bool isShownIndentGuide() const {
|
||||
return (execute(SCI_GETINDENTATIONGUIDES) != 0);
|
||||
@ -838,7 +834,7 @@ public:
|
||||
void setHotspotStyle(const Style& styleToSet);
|
||||
void setTabSettings(Lang *lang);
|
||||
bool isWrapRestoreNeeded() const {return _wrapRestoreNeeded;};
|
||||
void setWrapRestoreNeeded(bool isWrapRestoredNeeded) {_wrapRestoreNeeded = isWrapRestoredNeeded;};
|
||||
void setWrapRestoreNeeded(bool isWrapRestoreNeeded) {_wrapRestoreNeeded = isWrapRestoreNeeded;};
|
||||
|
||||
bool isCJK() const {
|
||||
return ((_codepage == CP_CHINESE_TRADITIONAL) || (_codepage == CP_CHINESE_SIMPLIFIED) ||
|
||||
@ -1001,7 +997,7 @@ protected:
|
||||
|
||||
void setTeXLexer() {
|
||||
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);
|
||||
};
|
||||
|
||||
@ -1248,9 +1244,9 @@ protected:
|
||||
|
||||
void setErrorListLexer() {
|
||||
setLexer(L_ERRORLIST, LIST_NONE);
|
||||
bool do_show_escape_chars = 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_UNKNOWN), static_cast<LPARAM>(do_show_escape_chars));
|
||||
bool doShowEscapeChars = isShownCcUniEol(); // decide based on the ControlCharacter+UnicodeEOL flag
|
||||
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>(doShowEscapeChars));
|
||||
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"));
|
||||
}
|
||||
@ -1268,7 +1264,7 @@ protected:
|
||||
setLexer(L_SEARCHRESULT, LIST_NONE);
|
||||
};
|
||||
|
||||
bool isNeededFolderMarge(LangType typeDoc) const {
|
||||
bool isNeededFolderMargin(LangType typeDoc) const {
|
||||
switch (typeDoc)
|
||||
{
|
||||
case L_ASCII:
|
||||
|
@ -544,7 +544,7 @@ intptr_t CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM l
|
||||
|
||||
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);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ BEGIN
|
||||
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
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
@ -149,7 +149,7 @@ BEGIN
|
||||
|
||||
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 "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
|
||||
PUSHBUTTON "...",IDC_BUTTON_LAUNCHSTYLECONF_CRLF,429,44,16,14
|
||||
|
||||
|
@ -121,7 +121,7 @@ intptr_t CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
||||
case WM_INITDIALOG :
|
||||
{
|
||||
_generalSubDlg.init(_hInst, _hSelf);
|
||||
_generalSubDlg.create(IDD_PREFERENCE_SUB_GENRAL, false, false);
|
||||
_generalSubDlg.create(IDD_PREFERENCE_SUB_GENERAL, false, false);
|
||||
_generalSubDlg.display();
|
||||
|
||||
_toolbarSubDlg.init(_hInst, _hSelf);
|
||||
@ -301,7 +301,7 @@ intptr_t CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
||||
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();
|
||||
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);
|
||||
::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
|
||||
{
|
||||
string fn = localizationSwitcher.getFileName();
|
||||
@ -1326,8 +1326,8 @@ intptr_t CALLBACK TabbarSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
||||
|
||||
case IDC_CHECK_LOCK:
|
||||
{
|
||||
bool islocked = isCheckedOrNot(IDC_CHECK_LOCK);
|
||||
if (islocked)
|
||||
bool isLocked = isCheckedOrNot(IDC_CHECK_LOCK);
|
||||
if (isLocked)
|
||||
nppGUI._tabStatus &= ~TAB_DRAGNDROP;
|
||||
else
|
||||
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 ctrl_V = (!shift && ctrl && !alt && wParam == 'V');
|
||||
bool shif_INS = (shift && !ctrl && !alt && wParam == VK_INSERT);
|
||||
if ( ctrl_V || shif_INS)
|
||||
bool shift_INS = (shift && !ctrl && !alt && wParam == VK_INSERT);
|
||||
if ( ctrl_V || shift_INS)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -1568,7 +1568,7 @@ static LRESULT CALLBACK editNumSpaceProc(HWND hwnd, UINT message, WPARAM wParam,
|
||||
|
||||
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;
|
||||
}
|
||||
@ -1583,7 +1583,7 @@ static LRESULT CALLBACK editNumSpaceProc(HWND hwnd, UINT message, WPARAM wParam,
|
||||
}
|
||||
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;
|
||||
}
|
||||
@ -1800,7 +1800,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
NppParameters& nppParam = NppParameters::getInstance();
|
||||
ScintillaViewParams& svp = const_cast<ScintillaViewParams&>(nppParam.getSVP());
|
||||
|
||||
// defaul => (svp._eolMode == svp.roundedRectangleText)
|
||||
// default => (svp._eolMode == svp.roundedRectangleText)
|
||||
bool checkDefaultCRLF = true;
|
||||
bool checkPlainTextCRLF = false;
|
||||
bool checkWithColorCRLF = false;
|
||||
@ -1824,7 +1824,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
checkWithColorCRLF = true;
|
||||
}
|
||||
::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);
|
||||
|
||||
|
||||
@ -1938,7 +1938,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
}
|
||||
|
||||
::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;
|
||||
|
||||
@ -1949,7 +1949,7 @@ intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
return TRUE;
|
||||
|
||||
case IDC_RADIO_ROUNDCORNER_CRLF:
|
||||
case IDC_RADIO_PLEINTEXT_CRLF:
|
||||
case IDC_RADIO_PLAINTEXT_CRLF:
|
||||
case 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;
|
||||
}
|
||||
else if (wParam == IDC_RADIO_PLEINTEXT_CRLF)
|
||||
else if (wParam == IDC_RADIO_PLAINTEXT_CRLF)
|
||||
{
|
||||
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;
|
||||
}
|
||||
else // IDC_RADIO_PLEINTEXT_CRLF
|
||||
else // IDC_RADIO_PLAINTEXT_CRLF
|
||||
{
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#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_RADIO_SMALLICON 6103
|
||||
@ -174,7 +174,7 @@
|
||||
|
||||
#define IDC_GB_STATIC_CRLF 6247
|
||||
#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_BUTTON_LAUNCHSTYLECONF_CRLF 6251
|
||||
|
||||
|
@ -57,7 +57,7 @@ void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize, double iSpli
|
||||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_RBUTTONDOWN : //rightclick selects tab aswell
|
||||
case WM_RBUTTONDOWN : //rightclick selects tab as well
|
||||
{
|
||||
// TCS_BUTTONS doesn't select the tab
|
||||
if (::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS)
|
||||
|
@ -28,16 +28,19 @@ trayIconControler::trayIconControler(HWND hwnd, UINT uID, UINT uCBMsg, HICON hic
|
||||
wcscpy_s(_nid.szTip, tip);
|
||||
|
||||
::RegisterWindowMessage(L"TaskbarCreated");
|
||||
_isIconShowed = false;
|
||||
_isIconShown = false;
|
||||
}
|
||||
|
||||
int trayIconControler::doTrayIcon(DWORD op)
|
||||
{
|
||||
if ((op != ADD)&&(op != REMOVE)) return INCORRECT_OPERATION;
|
||||
if (((_isIconShowed)&&(op == ADD))||((!_isIconShowed)&&(op == REMOVE)))
|
||||
if (op != ADD && op != REMOVE)
|
||||
return INCORRECT_OPERATION;
|
||||
|
||||
if ((_isIconShown && op == ADD) || (!_isIconShown && op == REMOVE))
|
||||
return OPERATION_INCOHERENT;
|
||||
|
||||
::Shell_NotifyIcon(op, &_nid);
|
||||
_isIconShowed = !_isIconShowed;
|
||||
_isIconShown = !_isIconShown;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -31,10 +31,10 @@ class trayIconControler
|
||||
public:
|
||||
trayIconControler(HWND hwnd, UINT uID, UINT uCBMsg, HICON hicon, const wchar_t *tip);
|
||||
int doTrayIcon(DWORD op);
|
||||
bool isInTray() const {return _isIconShowed;};
|
||||
bool isInTray() const {return _isIconShown;};
|
||||
|
||||
private:
|
||||
NOTIFYICONDATA _nid;
|
||||
bool _isIconShowed = false;
|
||||
bool _isIconShown = false;
|
||||
};
|
||||
|
||||
|
@ -671,7 +671,7 @@
|
||||
#define NPPM_INTERNAL_SETTOOLICONSSET (NOTEPADPLUS_USER_INTERNAL + 30)
|
||||
#define NPPM_INTERNAL_RELOADSTYLERS (NOTEPADPLUS_USER_INTERNAL + 31)
|
||||
#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_RECENTFILELIST_UPDATE (NOTEPADPLUS_USER_INTERNAL + 35)
|
||||
#define NPPM_INTERNAL_RECENTFILELIST_SWITCH (NOTEPADPLUS_USER_INTERNAL + 36)
|
||||
|
Loading…
x
Reference in New Issue
Block a user