Fix typos

and clean-up.

Close #16576
This commit is contained in:
Don Ho 2025-05-21 00:39:07 +02:00
parent 9232226d3f
commit b742c540bb
55 changed files with 371 additions and 378 deletions

View File

@ -1447,11 +1447,11 @@ You can re-activate this dialog in Preferences later."/>
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.
You have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
<SaveCurrentModifWarning title="Save Current Modification" message="You should save the current modification.
All the saved modifications can not be undone.
All the saved modifications cannot be undone.
Continue?"/><!-- HowToReproduce: when you openned file is modified but unsaved yet, and you are changing file encoding. -->
<LoseUndoAbilityWarning title="Lose Undo Ability Warning" message="You should save the current modification.
All the saved modifications can not be undone.
All the saved modifications cannot be undone.
Continue?"/><!-- HowToReproduce: when you openned file is modified and saved, then you are changing file encoding. -->
<CannotMoveDoc title="Move to new Notepad++ Instance" message="Document is modified, save it then try again."/><!-- HowToReproduce: From your Notepad++ drag & drop a clean (not dirty) file to outside of Notepad++, another instance of Notepad++ will be created. Then from your first Notepad++ drag & drop an unsaved file to the new instance. -->
@ -1516,12 +1516,12 @@ Do you want to go to Notepad++ page to download the latest version?"/><!-- HowTo
Do you want to open it?"/>
<CreateNewFileOrNot title="Create new file" message="&quot;$STR_REPLACE$&quot; doesn't exist. Create it?"/>
<CreateNewFileError title="Create new file" message="Cannot create the file &quot;$STR_REPLACE$&quot;."/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
<OpenFileError title="ERROR" message="Can not open file &quot;$STR_REPLACE$&quot;."/>
<OpenFileError title="ERROR" message="Cannot open file &quot;$STR_REPLACE$&quot;."/>
<OpenFileNoFolderError title="Cannot open file" message="&quot;$STR_REPLACE1$&quot; cannot be opened:
Folder &quot;$STR_REPLACE2$&quot; doesn't exist."/>
<FileBackupFailed title="File Backup Failed" message="The previous version of the file could not be saved into the backup directory at &quot;$STR_REPLACE$&quot;.
Do you want to save the current file anyways?"/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
Do you want to save the current file anyway?"/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
<LoadStylersFailed title="Load stylers.xml failed" message="Load &quot;$STR_REPLACE$&quot; failed!"/>
<LoadLangsFailed title="Configurator" message="Load langs.xml failed!
Do you want to recover your langs.xml?"/><!-- HowToReproduce: Close Notepad++. Use another editor to remove all content of "langs.xml" (0 length) then save it. Open Notepad++. -->
@ -1594,7 +1594,7 @@ If you require the backward regex searching feature, consult the user manual for
<PrintError title="0" message="Cannot start printer document."/><!-- Use title="0" to use Windows OS default translated "Error" title. -->
<FindAutoChangeOfInSelectionWarning title="Search warning" message="The &quot;In selection&quot; checkbox state has been automatically modified.
Please verify the search condition before performing the action."/> <!-- HowToReproduce: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14897#issuecomment-2564316224 -->
<Need2Restart2ShowMenuShortcuts title="Notepad++ needs to be restarted" message="Notepad++ needs to be restarted to show right menu shorcuts."/>
<Need2Restart2ShowMenuShortcuts title="Notepad++ needs to be restarted" message="Notepad++ needs to be restarted to show right menu shortcuts."/>
</MessageBox>
<ClipboardHistory>
<PanelTitle name="Clipboard History"/>

View File

@ -1447,11 +1447,11 @@ You can re-activate this dialog in Preferences later."/>
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.
You have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
<SaveCurrentModifWarning title="Save Current Modification" message="You should save the current modification.
All the saved modifications can not be undone.
All the saved modifications cannot be undone.
Continue?"/><!-- HowToReproduce: when you openned file is modified but unsaved yet, and you are changing file encoding. -->
<LoseUndoAbilityWarning title="Lose Undo Ability Warning" message="You should save the current modification.
All the saved modifications can not be undone.
All the saved modifications cannot be undone.
Continue?"/><!-- HowToReproduce: when you openned file is modified and saved, then you are changing file encoding. -->
<CannotMoveDoc title="Move to new Notepad++ Instance" message="Document is modified, save it then try again."/><!-- HowToReproduce: From your Notepad++ drag & drop a clean (not dirty) file to outside of Notepad++, another instance of Notepad++ will be created. Then from your first Notepad++ drag & drop an unsaved file to the new instance. -->
@ -1516,12 +1516,12 @@ Do you want to go to Notepad++ page to download the latest version?"/><!-- HowTo
Do you want to open it?"/>
<CreateNewFileOrNot title="Create new file" message="&quot;$STR_REPLACE$&quot; doesn't exist. Create it?"/>
<CreateNewFileError title="Create new file" message="Cannot create the file &quot;$STR_REPLACE$&quot;."/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
<OpenFileError title="ERROR" message="Can not open file &quot;$STR_REPLACE$&quot;."/>
<OpenFileError title="ERROR" message="Cannot open file &quot;$STR_REPLACE$&quot;."/>
<OpenFileNoFolderError title="Cannot open file" message="&quot;$STR_REPLACE1$&quot; cannot be opened:
Folder &quot;$STR_REPLACE2$&quot; doesn't exist."/>
<FileBackupFailed title="File Backup Failed" message="The previous version of the file could not be saved into the backup directory at &quot;$STR_REPLACE$&quot;.
Do you want to save the current file anyways?"/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
Do you want to save the current file anyway?"/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
<LoadStylersFailed title="Load stylers.xml failed" message="Load &quot;$STR_REPLACE$&quot; failed!"/>
<LoadLangsFailed title="Configurator" message="Load langs.xml failed!
Do you want to recover your langs.xml?"/><!-- HowToReproduce: Close Notepad++. Use another editor to remove all content of "langs.xml" (0 length) then save it. Open Notepad++. -->
@ -1594,7 +1594,7 @@ If you require the backward regex searching feature, consult the user manual for
<PrintError title="0" message="Cannot start printer document."/><!-- Use title="0" to use Windows OS default translated "Error" title. -->
<FindAutoChangeOfInSelectionWarning title="Search warning" message="The &quot;In selection&quot; checkbox state has been automatically modified.
Please verify the search condition before performing the action."/> <!-- HowToReproduce: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14897#issuecomment-2564316224 -->
<Need2Restart2ShowMenuShortcuts title="Notepad++ needs to be restarted" message="Notepad++ needs to be restarted to show right menu shorcuts."/>
<Need2Restart2ShowMenuShortcuts title="Notepad++ needs to be restarted" message="Notepad++ needs to be restarted to show right menu shortcuts."/>
</MessageBox>
<ClipboardHistory>
<PanelTitle name="Clipboard History"/>

View File

@ -1187,7 +1187,7 @@
<OpenFileError title="ERROR" message="Δεν μπορεί να ανοίξει το αρχείο &quot;$STR_REPLACE$&quot;."/>
<FileBackupFailed title="Αποτυχία δημιουργίας αντιγράφου αρχείου" message="Η προηγούμενη έκδοση του αρχείου δεν μπόρεσε να αποθηκευτεί στον κατάλογο αντιγράφων ασφαλείας στο &quot;$STR_REPLACE$&quot;.
Do you want to save the current file anyways?"/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
Do you want to save the current file anyway?"/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
<LoadStylersFailed title="Load stylers.xml failed" message="Load &quot;$STR_REPLACE$&quot; failed!"/>
<LoadLangsFailed title="Configurator" message="Load langs.xml failed!
Do you want to recover your langs.xml?"/><!-- HowToReproduce: Close Notepad++. Use another editor to remove all content of "langs.xml" (0 length) then save it. Open Notepad++. -->

View File

@ -804,8 +804,8 @@
<MessageBox>
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.\rYou have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
<NppHelpAbsentWarning title="File does not exist" message="\rdoesn't exist. Please download it on Notepad++ site."/>
<SaveCurrentModifWarning title="Save Current Modification" message="You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"/>
<LoseUndoAbilityWarning title="Lose Undo Ability Warning" message="You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"/>
<SaveCurrentModifWarning title="Save Current Modification" message="You should save the current modification.\rAll the saved modifications cannot be undone.\r\rContinue?"/>
<LoseUndoAbilityWarning title="Lose Undo Ability Warning" message="You should save the current modification.\rAll the saved modifications cannot be undone.\r\rContinue?"/>
<CannotMoveDoc title="Move to new Notepad++ Instance" message="Document is modified, save it then try again."/>
<DocReloadWarning title="Reload" message="Are you sure you want to reload the current file and lose the changes made in Notepad++?"/>
<FileLockedWarning title="Save failed" message="Please check whether if this file is opened in another program"/>

View File

@ -1067,10 +1067,10 @@ You have to restart your Notepad++ to take effect after modifying contextMenu.xm
<NppHelpAbsentWarning title="File does not exist" message="
doesn't exist. Please download it on Notepad++ site."/>
<SaveCurrentModifWarning title="Save Current Modification" message="You should save the current modification.
All the saved modifications can not be undone.
All the saved modifications cannot be undone.
Continue?"/>
<LoseUndoAbilityWarning title="Lose Undo Ability Warning" message="You should save the current modification.
All the saved modifications can not be undone.
All the saved modifications cannot be undone.
Continue?"/>
<CannotMoveDoc title="Move to new Notepad++ Instance" message="Document is modified, save it then try again."/>
<DocReloadWarning title="Reload" message="Are you sure you want to reload the current file and lose the changes made in Notepad++?"/>
@ -1113,9 +1113,9 @@ Do you want to go to Notepad++ page to download the latest version?"/>
<FileTooBigToOpen title="File size problem" message="File is too big to be opened by Notepad++"/>
<CreateNewFileOrNot title="Create new file" message="&quot;$STR_REPLACE$&quot; doesn't exist. Create it?"/>
<CreateNewFileError title="Create new file" message="Cannot create the file &quot;$STR_REPLACE$&quot;."/>
<OpenFileError title="ERROR" message="Can not open file &quot;$STR_REPLACE$&quot;."/>
<OpenFileError title="ERROR" message="Cannot open file &quot;$STR_REPLACE$&quot;."/>
<FileBackupFailed title="File Backup Failed" message="The previous version of the file could not be saved into the backup directory at &quot;$STR_REPLACE$&quot;.
Do you want to save the current file anyways?"/>
Do you want to save the current file anyway?"/>
<LoadStylersFailed title="Load stylers.xml failed" message="Load &quot;$STR_REPLACE$&quot; failed!"/>
<LoadLangsFailed title="Configurator" message="Load langs.xml failed!
Do you want to recover your langs.xml?"/>

View File

@ -1260,7 +1260,7 @@ bool isCertificateValidated(const wstring & fullFilePath, const wstring & subjec
catch (...)
{
// Unknown error
wstring errorMessage = L"Unknown exception occured. ";
wstring errorMessage = L"Unknown exception occurred. ";
errorMessage += GetLastErrorAsString(GetLastError());
MessageBox(NULL, errorMessage.c_str(), L"Certificate checking", MB_OK);
}
@ -1323,7 +1323,7 @@ bool deleteFileOrFolder(const wstring& f2delete)
return (res == 0);
}
// Get a vector of full file paths in a given folder. File extension type filter should be *.*, *.xml, *.dll... according the type of file you want to get.
// Get a vector of full file paths in a given folder. File extension type filter should be *.*, *.xml, *.dll... according to the type of file you want to get.
void getFilesInFolder(std::vector<wstring>& files, const wstring& extTypeFilter, const wstring& inFolder)
{
wstring filter = inFolder;
@ -1782,13 +1782,13 @@ int Version::compareTo(const Version& v2c) const
bool Version::isCompatibleTo(const Version& from, const Version& to) const
{
// This method determinates if Version object is in between "from" version and "to" version, it's useful for testing compatibility of application.
// This method determines if Version object is in between "from" version and "to" version, it's useful for testing compatibility of application.
// test in versions <from, to> example:
// 1. <0.0.0.0, 0.0.0.0>: both from to versions are empty, so it's
// 2. <6.9, 6.9>: plugin is compatible to only v6.9
// 3. <4.2, 6.6.6>: from v4.2 (included) to v6.6.6 (included)
// 4. <0.0.0.0, 8.2.1>: all version until v8.2.1 (included)
// 5. <8.3, 0.0.0.0>: from v8.3 (included) to the latest verrsion
// 5. <8.3, 0.0.0.0>: from v8.3 (included) to the latest version
if (empty()) // if this version is empty, then no compatible to all version
return false;

View File

@ -48,7 +48,7 @@ const bool dirDown = false;
#endif
#define NPP_INTERNAL_FUCTION_STR L"Notepad++::InternalFunction"
#define NPP_INTERNAL_FUNCTION_STR L"Notepad++::InternalFunction"
std::wstring folderBrowser(HWND parent, const std::wstring & title = L"", int outputCtrlID = 0, const wchar_t *defaultStr = NULL);

View File

@ -275,7 +275,7 @@ public:
else
{
// the lengths of the numbers are equal
// compare the two number. However, we can not use std::stoll
// compare the two number. However, we cannot use std::stoll
// because the number strings can be every large, well over the maximum long long value
// thus, we compare each digit one by one
while (compareResult == 0
@ -444,7 +444,7 @@ public:
else
{
// the lengths of the numbers are equal
// compare the two number. However, we can not use std::stoll
// compare the two number. However, we cannot use std::stoll
// because the number strings can be every large, well over the maximum long long value
// thus, we compare each digit one by one
while (compareResult == 0

View File

@ -145,7 +145,7 @@ bool SecurityGuard::verifySignedLibrary(const std::wstring& filepath)
else
{
// if offline, revocation is not checked
// depending of windows version, this may introduce a latency on offline systems
// depending on windows version, this may introduce a latency on offline systems
DWORD netstatus;
QOCINFO oci;
oci.dwSize = sizeof(oci);
@ -159,7 +159,7 @@ bool SecurityGuard::verifySignedLibrary(const std::wstring& filepath)
winTEXTrust_data.fdwRevocationChecks = WTD_REVOKE_NONE;
if (doLogCertifError)
writeLog(L"c:\\tmp\\certifError.log", "VerifyLibrary: system is offline - certificate revocation wont be checked");
writeLog(L"c:\\tmp\\certifError.log", "VerifyLibrary: system is offline - certificate revocation won't be checked");
}
}
@ -251,7 +251,7 @@ bool SecurityGuard::verifySignedLibrary(const std::wstring& filepath)
std::unique_ptr<wchar_t[]> subject_buffer(new wchar_t[subject_sze]);
if (::CertNameToStr(X509_ASN_ENCODING, &context->pCertInfo->Subject, CERT_X500_NAME_STR, subject_buffer.get(), subject_sze) <= 1)
{
throw string("Failed to get x509 filed infos from certificate.");
throw string("Failed to get x509 field infos from certificate.");
}
subject = subject_buffer.get();
@ -299,7 +299,7 @@ bool SecurityGuard::verifySignedLibrary(const std::wstring& filepath)
if (doLogCertifError)
{
string msg = s;
msg += " - VerifyLibrary: error while getting certificate informations";
msg += " - VerifyLibrary: error while getting certificate information";
writeLog(L"c:\\tmp\\certifError.log", msg.c_str());
}
status = false;
@ -307,7 +307,7 @@ bool SecurityGuard::verifySignedLibrary(const std::wstring& filepath)
catch (...) {
// Unknown error
if (doLogCertifError)
writeLog(L"c:\\tmp\\certifError.log", "VerifyLibrary: error while getting certificate informations");
writeLog(L"c:\\tmp\\certifError.log", "VerifyLibrary: error while getting certificate information");
status = false;
}

View File

@ -15,7 +15,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//#define VerifySignedLibrary_DISABLE_REVOCATION_CHECK "Dont check certificat revocation"
//#define VerifySignedLibrary_DISABLE_REVOCATION_CHECK "Don't check certificat revocation"
/*
* Verifies an Authenticde DLL signature and ownership

View File

@ -33,7 +33,7 @@ bool MiniDumper::writeDump(EXCEPTION_POINTERS * pExceptionInfo)
LPCTSTR szResult = NULL;
bool retval = false;
HMODULE hDll = ::LoadLibraryEx(L"DBGHELP.DLL", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); //that wont work on older windows version than XP, #care :)
HMODULE hDll = ::LoadLibraryEx(L"DBGHELP.DLL", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); //that won't work on older windows version than XP, #care :)
if (hDll)
{

View File

@ -40,7 +40,7 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\
L_TYPESCRIPT, L_JSON5, L_MSSQL, L_GDSCRIPT, L_HOLLYWOOD,\
L_GOLANG, L_RAKU, L_TOML, L_SAS, L_ERRORLIST, \
// Don't use L_JS, use L_JAVASCRIPT instead
// The end of enumated language type, so it should be always at the end
// The end of enumerated language type, so it should be always at the end
L_EXTERNAL};
enum class ExternalLexerAutoIndentMode { Standard, C_Like, Custom };
enum class MacroStatus { Idle, RecordInProgress, RecordingStopped, PlayingBack };
@ -85,7 +85,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
#define NPPM_GETOPENFILENAMES_DEPRECATED (NPPMSG + 8)
// BOOL NPPM_GETOPENFILENAMES_DEPRECATED(wchar_t** fileNames, int nbFileNames) - DEPRECATED: It is kept for the compatibility. Use NPPM_GETBUFFERIDFROMPOS & NPPM_GETFULLPATHFROMBUFFERID instead.
// Get the open files full paths of both views. User is responsible to allocate an big enough fileNames array by using NPPM_GETNBOPENFILES.
// Get the open files full paths of both views. User is responsible to allocate a big enough fileNames array by using NPPM_GETNBOPENFILES.
// wParam[out]: fileNames - array of file path
// lParam[in]: nbFileNames is the number of file path.
// return value: The number of files copied into fileNames array
@ -160,7 +160,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
#define NPPM_DESTROYSCINTILLAHANDLE_DEPRECATED (NPPMSG + 21)
// BOOL NPPM_DESTROYSCINTILLAHANDLE_DEPRECATED(0, HWND hScintilla) - DEPRECATED: It is kept for the compatibility.
// Notepad++ will deallocate every createed Scintilla control on exit, this message returns TRUE but does nothing.
// Notepad++ will deallocate every created Scintilla control on exit, this message returns TRUE but does nothing.
// wParam: 0 (not used)
// lParam[in]: hScintilla is Scintilla handle
// Return TRUE
@ -241,14 +241,14 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
#define NPPM_DMMSHOW (NPPMSG + 30)
// BOOL NPPM_DMMSHOW(0, HWND hDlg)
// Show the dialog which was previously regeistered by NPPM_DMMREGASDCKDLG.
// Show the dialog which was previously registered by NPPM_DMMREGASDCKDLG.
// wParam: 0 (not used)
// lParam[in]: hDlg is the handle of dialog to show
// Return TRUE
#define NPPM_DMMHIDE (NPPMSG + 31)
// BOOL NPPM_DMMHIDE(0, HWND hDlg)
// Hide the dialog which was previously regeistered by NPPM_DMMREGASDCKDLG.
// Hide the dialog which was previously registered by NPPM_DMMREGASDCKDLG.
// wParam: 0 (not used)
// lParam[in]: hDlg is the handle of dialog to hide
// Return TRUE
@ -265,8 +265,8 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// Pass the necessary dockingData to Notepad++ in order to make your dialog dockable.
// wParam: 0 (not used)
// lParam[in]: pData is the pointer of tTbData. Please check tTbData structure in "Docking.h"
// Minimum informations which needs to be filled out are hClient, pszName, dlgID, uMask and pszModuleName.
// Notice that rcFloatand iPrevCont shouldn't be filled. They are used internally.
// Minimum information which needs to be filled out are hClient, pszName, dlgID, uMask and pszModuleName.
// Notice that rcFloat and iPrevCont shouldn't be filled. They are used internally.
// Return TRUE
#define NPPM_LOADSESSION (NPPMSG + 34)
@ -336,7 +336,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// Get OS (Windows) version.
// wParam: 0 (not used)
// lParam: 0 (not used)
// Return enum winVer, which is defined at the begining of this file
// Return enum winVer, which is defined at the beginning of this file
#define NPPM_DMMGETPLUGINHWNDBYNAME (NPPMSG + 43)
// HWND NPPM_DMMGETPLUGINHWNDBYNAME(const wchar_t *windowName, const wchar_t *moduleName)
@ -371,9 +371,9 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
#define NPPM_MSGTOPLUGIN (NPPMSG + 47)
struct CommunicationInfo {
long internalMsg; // an integer defined by plugin Y, known by plugin X, identifying the message being sent.
const wchar_t * srcModuleName; // the complete module name (with the extesion .dll) of caller (plugin X).
void* info; // defined by plugin, the informations to be exchanged between X and Y. It's a void pointer so it should be defined by plugin Y and known by plugin X.
long internalMsg; // an integer defined by plugin Y, known by plugin X, identifying the message being sent.
const wchar_t * srcModuleName; // the complete module name (with the extension .dll) of caller (plugin X).
void* info; // defined by plugin, the information to be exchanged between X and Y. It's a void pointer so it should be defined by plugin Y and known by plugin X.
};
// BOOL NPPM_MSGTOPLUGIN(wchar_t *destModuleName, CommunicationInfo *info)
// Send a private information to a plugin with given plugin name. This message allows the communication between 2 plugins.
@ -526,7 +526,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// Get the EOL format of the document with given bufferID.
// wParam[in]: BufferID to get EolType format from
// lParam: 0 (not used)
// Returned value is -1 on error, otherwize EolType format:
// Returned value is -1 on error, otherwise EolType format:
// 0: Windows (CRLF)
// 1: Macos (CR)
// 2: Unix (LF)
@ -633,7 +633,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// BOOL isAllocatedSuccessful = ::SendMessage(nppData._nppHandle, NPPM_ALLOCATECMDID, 4, &idBegin);
//
// if isAllocatedSuccessful is TRUE, and value of idBegin is 46581
// then menu iten ID 46581, 46582, 46583 and 46584 are preserved by Notepad++, and they are safe to be used by the plugin.
// then menu item ID 46581, 46582, 46583 and 46584 are preserved by Notepad++, and they are safe to be used by the plugin.
#define NPPM_ALLOCATEMARKER (NPPMSG + 82)
// BOOL NPPM_ALLOCATEMARKER(int numberRequested, int* startNumber)
@ -655,7 +655,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// int NPPM_GETLANGUAGENAME(LangType langType, wchar_t* langName)
// Get programming language name from the given language type (enum LangType).
// wParam[in]: langType is the number of LangType
// lParam[out]: langName is the buffer to recieve the language name string
// lParam[out]: langName is the buffer to receive the language name string
// Return value is the number of copied character / number of character to copy (\0 is not included)
//
// You should call this function 2 times - the first time you pass langName as NULL to get the number of characters to copy.
@ -666,7 +666,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// INT NPPM_GETLANGUAGEDESC(int langType, wchar_t *langDesc)
// Get programming language short description from the given language type (enum LangType)
// wParam[in]: langType is the number of LangType
// lParam[out]: langDesc is the buffer to recieve the language description string
// lParam[out]: langDesc is the buffer to receive the language description string
// Return value is the number of copied character / number of character to copy (\0 is not included)
//
// You should call this function 2 times - the first time you pass langDesc as NULL to get the number of characters to copy.
@ -814,7 +814,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// BOOL NPPM_GETEXTERNALLEXERAUTOINDENTMODE(const wchar_t* languageName, ExternalLexerAutoIndentMode* autoIndentMode)
// Get ExternalLexerAutoIndentMode for an installed external programming language.
// wParam[in]: languageName is external language name to search
// lParam[out]: autoIndentMode could recieve one of three following values
// lParam[out]: autoIndentMode could receive one of three following values
// - Standard (0) means Notepad++ will keep the same TAB indentation between lines;
// - C_Like (1) means Notepad++ will perform a C-Language style indentation for the selected external language;
// - Custom (2) means a Plugin will be controlling auto-indentation for the current language.
@ -824,7 +824,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// BOOL NPPM_SETEXTERNALLEXERAUTOINDENTMODE(const wchar_t* languageName, ExternalLexerAutoIndentMode autoIndentMode)
// Set ExternalLexerAutoIndentMode for an installed external programming language.
// wParam[in]: languageName is external language name to set
// lParam[in]: autoIndentMode could recieve one of three following values
// lParam[in]: autoIndentMode could receive one of three following values
// - Standard (0) means Notepad++ will keep the same TAB indentation between lines;
// - C_Like (1) means Notepad++ will perform a C-Language style indentation for the selected external language;
// - Custom (2) means a Plugin will be controlling auto-indentation for the current language.
@ -904,7 +904,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
#define NPPM_GETBOOKMARKID (NPPMSG + 111)
// int NPPM_GETBOOKMARKID(0, 0)
// Get the bookmark ID - use this API to get bookmark ID dynamically that garantees you get always the right bookmark ID even it's been changed through the different versions.
// Get the bookmark ID - use this API to get bookmark ID dynamically that guarantees you get always the right bookmark ID even it's been changed through the different versions.
// wParam: 0 (not used)
// lParam: 0 (not used)
// Return bookmark ID
@ -924,7 +924,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// Might not work properly in C# plugins.
// wParam[in]: dmFlags has 2 possible value dmfInit (0x0000000BUL) & dmfHandleChange (0x0000000CUL) - see above definition
// lParam[in]: hwnd is the dialog handle of plugin - Docking panels don't need to call NPPM_DARKMODESUBCLASSANDTHEME
// Returns succesful combinations of flags.
// Returns successful combinations of flags.
// Examples:
//
@ -970,7 +970,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// lParam[in]: tabIndex - index (in the view indicated above). -1 for currently active tab
// Return tab color ID which contains the following values: 0 (yellow), 1 (green), 2 (blue), 3 (orange), 4 (pink) or -1 (no color)
//
// Note: there's no symetric command NPPM_SETTABCOLORID. Plugins can use NPPM_MENUCOMMAND to set current tab color with the desired tab color ID.
// Note: there's no symmetric command NPPM_SETTABCOLORID. Plugins can use NPPM_MENUCOMMAND to set current tab color with the desired tab color ID.
#define NPPM_SETUNTITLEDNAME (NPPMSG + 115)
// BOOL NPPM_SETUNTITLEDNAME(BufferID id, const wchar_t* newName)
@ -990,14 +990,14 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// Return the number of char copied/to copy
#define NPPM_ADDSCNMODIFIEDFLAGS (NPPMSG + 117)
// BOOL NPPM_ADDSCNMODIFIEDFLAGS(0, unsigned long scnMotifiedFlags2Add)
// BOOL NPPM_ADDSCNMODIFIEDFLAGS(0, unsigned long scnModifiedFlags2Add)
// Add the necessary SCN_MODIFIED flags so that your plugin will receive the SCN_MODIFIED notification for these events, enabling your specific treatments.
// By default, Notepad++ only forwards SCN_MODIFIED with the following 5 flags/events:
// SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT | SC_PERFORMED_UNDO | SC_PERFORMED_REDO | SC_MOD_CHANGEINDICATOR to plugins.
// If your plugin needs to process other SCN_MODIFIED events, you should add the required flags by sending this message to Notepad++. You can send it immediately after receiving NPPN_READY,
// or only when your plugin needs to listen to specific events (to avoid penalizing Notepad++'s performance). Just ensure that the message is sent only once.
// wParam: 0 (not used)
// lParam[in]: scnMotifiedFlags2Add - Scintilla SCN_MODIFIED flags to add.
// lParam[in]: scnModifiedFlags2Add - Scintilla SCN_MODIFIED flags to add.
// Return TRUE
//
// Example:
@ -1019,7 +1019,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
#define NPPM_GETTOOLBARICONSETCHOICE (NPPMSG + 118)
// BOOL NPPM_GETTOOLBARICONSETCHOICE(0, 0)
// Get Notepad++ toobar icon set choice (Fluent UI: small, Fluent UI: large, Filled Fluent UI: small, Filled Fluent UI: large and Standard icons: small.
// Get Notepad++ toolbar icon set choice (Fluent UI: small, Fluent UI: large, Filled Fluent UI: small, Filled Fluent UI: large and Standard icons: small.
// wParam: 0 (not used)
// lParam: 0 (not used)
// Return toolbar icon set choice as an integer value. Here are 5 possible values:

View File

@ -583,7 +583,7 @@ void PluginsManager::addInMenuFromPMIndex(int i)
itemName += pcs.toString();
}
else
{ //no ShortcutKey is provided, add an disabled shortcut (so it can still be mapped, Paramaters class can still index any changes and the toolbar wont funk out
{ //no ShortcutKey is provided, add an disabled shortcut (so it can still be mapped, Paramaters class can still index any changes and the toolbar won't funk out
Shortcut sc(itemName.c_str(), false, false, false, 0x00);
PluginCmdShortcut pcs(sc, cmdID, wstring2string(_pluginInfos[i]->_moduleName, CP_UTF8).c_str(), j); //VK_NULL and everything disabled, the menu name is left alone
pluginCmdSCList.push_back(pcs);

View File

@ -810,7 +810,7 @@ LRESULT Notepad_plus::init(HWND hwnd)
for (size_t i = 0, len = dmd._pluginDockInfo.size(); i < len; ++i)
{
PluginDlgDockingInfo& pdi = dmd._pluginDockInfo[i];
const bool isInternalFunc = pdi._name == NPP_INTERNAL_FUCTION_STR;
const bool isInternalFunc = pdi._name == NPP_INTERNAL_FUNCTION_STR;
bool showPanel = true;
if (nppGUI._isCmdlineNosessionActivated)
@ -896,7 +896,7 @@ bool Notepad_plus::saveGUIParams()
nppGUI._toolbarShow = _rebarTop.getIDVisible(REBAR_BAR_TOOLBAR);
nppGUI._tbIconInfo._tbIconSet = _toolBar.getState();
nppGUI._splitterPos = _subSplitter.isVertical()?POS_VERTICAL:POS_HORIZOTAL;
nppGUI._splitterPos = _subSplitter.isVertical() ? POS_VERTICAL : POS_HORIZONTAL;
UserDefineDialog *udd = _pEditView->getUserDefineDlg();
bool b = udd->isDocked();
nppGUI._userDefineDlgStatus = (b?UDD_DOCKED:0) | (udd->isVisible()?UDD_SHOW:0);
@ -2650,8 +2650,8 @@ void Notepad_plus::checkSyncState()
bool canDoSync = viewVisible(MAIN_VIEW) && viewVisible(SUB_VIEW);
if (!canDoSync)
{
_syncInfo._isSynScollV = false;
_syncInfo._isSynScollH = false;
_syncInfo._isSynScrollV = false;
_syncInfo._isSynScrollH = false;
checkMenuItem(IDM_VIEW_SYNSCROLLV, false);
checkMenuItem(IDM_VIEW_SYNSCROLLH, false);
_toolBar.setCheck(IDM_VIEW_SYNSCROLLV, false);
@ -2815,7 +2815,7 @@ void Notepad_plus::copyMarkedLines()
globalStr = currentStr;
}
}
str2Cliboard(globalStr);
str2Clipboard(globalStr, _pPublicInterface->getHSelf());
}
std::mutex mark_mutex;
@ -2839,7 +2839,7 @@ void Notepad_plus::cutMarkedLines()
}
}
_pEditView->execute(SCI_ENDUNDOACTION);
str2Cliboard(globalStr);
str2Clipboard(globalStr, _pPublicInterface->getHSelf());
}
void Notepad_plus::deleteMarkedLines(bool isMarked)
@ -4434,7 +4434,7 @@ void Notepad_plus::dropFiles(HDROP hdrop)
{
if (hdrop)
{
// Determinate in which view the file(s) is (are) dropped
// Determine in which view the file(s) is (are) dropped
POINT p{};
::DragQueryPoint(hdrop, &p);
HWND hWin = ::ChildWindowFromPointEx(_pPublicInterface->getHSelf(), p, CWP_SKIPINVISIBLE);
@ -5966,7 +5966,7 @@ void Notepad_plus::fullScreenToggle()
//Setup GUI
if (!_beforeSpecialView._isPostIt)
{
//only change the GUI if postit isnt active
//only change the GUI if postit isn't active
if (_beforeSpecialView._isMenuShown)
::SendMessage(_pPublicInterface->getHSelf(), NPPM_HIDEMENU, 0, FALSE);
@ -5979,7 +5979,7 @@ void Notepad_plus::fullScreenToggle()
if (!_beforeSpecialView._isPostIt)
{
::SetWindowLongPtr( _pPublicInterface->getHSelf(), GWL_STYLE, _beforeSpecialView._preStyle);
//Redraw the window and refresh windowmanager cache, dont do anything else, sizing is done later on
//Redraw the window and refresh windowmanager cache, don't do anything else, sizing is done later on
::SetWindowPos(_pPublicInterface->getHSelf(), HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED);
::ShowWindow(_pPublicInterface->getHSelf(), SW_SHOW);
}
@ -6068,7 +6068,7 @@ void Notepad_plus::postItToggle()
//something went wrong, use default settings
_beforeSpecialView._preStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN;
}
//Redraw the window and refresh windowmanager cache, dont do anything else, sizing is done later on
//Redraw the window and refresh windowmanager cache, don't do anything else, sizing is done later on
::SetWindowPos(_pPublicInterface->getHSelf(), HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED);
::ShowWindow(_pPublicInterface->getHSelf(), SW_SHOW);
}
@ -6120,7 +6120,7 @@ void Notepad_plus::postItToggle()
::ShowWindow(_pPublicInterface->getHSelf(), SW_HIDE);
::SetWindowLongPtr(_pPublicInterface->getHSelf(), GWL_STYLE, _beforeSpecialView._preStyle);
//Redraw the window and refresh windowmanager cache, dont do anything else, sizing is done later on
//Redraw the window and refresh windowmanager cache, don't do anything else, sizing is done later on
::SetWindowPos(_pPublicInterface->getHSelf(), HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED);
::ShowWindow(_pPublicInterface->getHSelf(), SW_SHOW);
}
@ -6215,7 +6215,7 @@ void Notepad_plus::distractionFreeToggle()
_pEditView->execute(SCI_SETMARGINRIGHT, 0, paddingRight);
}
void Notepad_plus::doSynScorll(HWND whichView)
void Notepad_plus::doSynScroll(HWND whichView)
{
intptr_t column = 0;
intptr_t line = 0;
@ -6231,14 +6231,14 @@ void Notepad_plus::doSynScorll(HWND whichView)
if (whichView == _mainEditView.getHSelf())
{
if (_syncInfo._isSynScollV)
if (_syncInfo._isSynScrollV)
{
// Compute for Line
mainCurrentLine = _mainEditView.execute(SCI_GETFIRSTVISIBLELINE);
subCurrentLine = _subEditView.execute(SCI_GETFIRSTVISIBLELINE);
line = mainCurrentLine - _syncInfo._line - subCurrentLine;
}
if (_syncInfo._isSynScollH)
if (_syncInfo._isSynScrollH)
{
// Compute for Column
mxoffset = _mainEditView.execute(SCI_GETXOFFSET);
@ -6254,14 +6254,14 @@ void Notepad_plus::doSynScorll(HWND whichView)
}
else if (whichView == _subEditView.getHSelf())
{
if (_syncInfo._isSynScollV)
if (_syncInfo._isSynScrollV)
{
// Compute for Line
mainCurrentLine = _mainEditView.execute(SCI_GETFIRSTVISIBLELINE);
subCurrentLine = _subEditView.execute(SCI_GETFIRSTVISIBLELINE);
line = subCurrentLine + _syncInfo._line - mainCurrentLine;
}
if (_syncInfo._isSynScollH)
if (_syncInfo._isSynScrollH)
{
// Compute for Column
mxoffset = _mainEditView.execute(SCI_GETXOFFSET);
@ -6309,7 +6309,7 @@ bool Notepad_plus::getIntegralDockingData(tTbData & dockData, int & iCont, bool
}
void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includUntitledDoc)
void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includeUntitledDoc)
{
_mainEditView.saveCurrentPos(); //save position so itll be correct in the session
_subEditView.saveCurrentPos(); //both views
@ -6337,7 +6337,7 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includUntitledD
if (buf->isUntitled() && buf->docLength() == 0)
continue;
if (!includUntitledDoc)
if (!includeUntitledDoc)
if (!doesFileExist(buf->getFullPathName()))
continue;
@ -6391,11 +6391,6 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includUntitledD
_invisibleEditView.execute(SCI_SETDOCPOINTER, 0, oldDoc);
}
bool Notepad_plus::str2Cliboard(const wstring & str2cpy)
{
return str2Clipboard(str2cpy, _pPublicInterface->getHSelf());
}
//ONLY CALL IN CASE OF EMERGENCY: EXCEPTION
//This function is destructive
bool Notepad_plus::emergency(const wstring& emergencySavedDir)
@ -6582,7 +6577,7 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
// Since the file content has changed but the user doesn't want to reload it, set state to dirty
buffer->setDirty(true);
// buffer in Notepad++ is not syncronized anymore with the file on disk
// buffer in Notepad++ is not synchronized anymore with the file on disk
buffer->setUnsync(true);
break; //abort
@ -6591,7 +6586,7 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
// Set _isLoadedDirty false so when the document clean state is reached the icon will be set to blue
buffer->setLoadedDirty(false);
// buffer in Notepad++ is syncronized with the file on disk
// buffer in Notepad++ is synchronized with the file on disk
buffer->setUnsync(false);
doReload(buffer->getID(), false);
@ -6612,7 +6607,7 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
_mainEditView.setPositionRestoreNeeded(false);
_mainEditView.execute(SCI_DOCUMENTEND);
}
// but also test sub-view, because the buffer could be clonned
// but also test sub-view, because the buffer could be cloned
if (buffer == _subEditView.getCurrentBuffer())
{
_subEditView.setPositionRestoreNeeded(false);
@ -6649,7 +6644,7 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
}
else
{
// buffer in Notepad++ is not syncronized anymore with the file on disk
// buffer in Notepad++ is not synchronized anymore with the file on disk
buffer->setUnsync(true);
}
}
@ -6756,7 +6751,7 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
}
if (view != currentView())
return; //dont care if another view did something
return; //don't care if another view did something
checkDocState();
@ -7194,7 +7189,7 @@ bool Notepad_plus::reloadLang()
}
if (_preference.isCreated())
{
_nativeLangSpeaker.changePrefereceDlgLang(_preference);
_nativeLangSpeaker.changePreferenceDlgLang(_preference);
}
if (_configStyleDlg.isCreated())
@ -7305,7 +7300,7 @@ void Notepad_plus::launchClipboardHistoryPanel()
const int iconSize = DPIManagerV2::scale(g_dockingContTabIconSize, _pClipboardHistoryPanel->getHSelf());
DPIManagerV2::loadIcon(_pPublicInterface->getHinst(), MAKEINTRESOURCE(icoID), iconSize, iconSize, &data.hIconTab, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -7369,7 +7364,7 @@ void Notepad_plus::launchDocumentListPanel(bool changeFromBtnCmd)
const int iconSize = DPIManagerV2::scale(g_dockingContTabIconSize, _pDocumentListPanel->getHSelf());
DPIManagerV2::loadIcon(_pPublicInterface->getHinst(), MAKEINTRESOURCE(icoID), iconSize, iconSize, &data.hIconTab, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -7457,7 +7452,7 @@ void Notepad_plus::launchAnsiCharPanel()
const int iconSize = DPIManagerV2::scale(g_dockingContTabIconSize, _pAnsiCharPanel->getHSelf());
DPIManagerV2::loadIcon(_pPublicInterface->getHinst(), MAKEINTRESOURCE(icoID), iconSize, iconSize, &data.hIconTab, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -7509,7 +7504,7 @@ void Notepad_plus::launchFileBrowser(const vector<wstring> & folders, const wstr
const int iconSize = DPIManagerV2::scale(g_dockingContTabIconSize, _pFileBrowser->getHSelf());
DPIManagerV2::loadIcon(_pPublicInterface->getHinst(), MAKEINTRESOURCE(icoID), iconSize, iconSize, &data.hIconTab, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -7619,7 +7614,7 @@ void Notepad_plus::launchProjectPanel(int cmdID, ProjectPanel ** pProjPanel, int
const int iconSize = DPIManagerV2::scale(g_dockingContTabIconSize, (*pProjPanel)->getHSelf());
DPIManagerV2::loadIcon(_pPublicInterface->getHinst(), MAKEINTRESOURCE(icoID), iconSize, iconSize, &data.hIconTab, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -7685,7 +7680,7 @@ void Notepad_plus::launchDocMap()
const int iconSize = DPIManagerV2::scale(g_dockingContTabIconSize, _pDocMap->getHSelf());
DPIManagerV2::loadIcon(_pPublicInterface->getHinst(), MAKEINTRESOURCE(icoID), iconSize, iconSize, &data.hIconTab, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -7736,7 +7731,7 @@ void Notepad_plus::launchFunctionList()
const int iconSize = DPIManagerV2::scale(g_dockingContTabIconSize, _pFuncList->getHSelf());
DPIManagerV2::loadIcon(_pPublicInterface->getHinst(), MAKEINTRESOURCE(icoID), iconSize, iconSize, &data.hIconTab, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -7744,7 +7739,7 @@ void Notepad_plus::launchFunctionList()
data.dlgID = IDM_VIEW_FUNC_LIST;
NativeLangSpeaker *pNativeSpeaker = nppParam.getNativeLangSpeaker();
wstring title_temp = pNativeSpeaker->getAttrNameStr(FL_PANELTITLE, FL_FUCTIONLISTROOTNODE, "PanelTitle");
wstring title_temp = pNativeSpeaker->getAttrNameStr(FL_PANELTITLE, FL_FUNCTIONLISTROOTNODE, "PanelTitle");
static wchar_t title[32];
if (title_temp.length() < 32)
@ -9006,7 +9001,7 @@ void Notepad_plus::clearChangesHistory()
_pEditView->execute(SCI_GOTOPOS, pos);
checkUndoState();
_pNonEditView->redraw(); // Prevent clonned document visual glichy on another view
_pNonEditView->redraw(); // Prevent cloned document visual glichy on another view
}
// Based on https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12248#issuecomment-1258561261.

View File

@ -165,16 +165,15 @@ public:
void setTitle();
void getTaskListInfo(TaskListInfo *tli);
size_t getNbDirtyBuffer(int view);
// For filtering the modeless Dialog message
//! \name File Operations
//@{
//The doXXX functions apply to a single buffer and dont need to worry about views, with the excpetion of doClose, since closing one view doesnt have to mean the document is gone
// The following functions apply to a single buffer and don't need to worry about views, with the exception of doClose,
// since closing one view doesn't have to mean the document is gone
BufferID doOpen(const std::wstring& fileName, bool isRecursive = false, bool isReadOnly = false, int encoding = -1, const wchar_t *backupFileName = NULL, FILETIME fileNameTimestamp = {});
bool doReload(BufferID id, bool alert = true);
bool doSave(BufferID, const wchar_t * filename, bool isSaveCopy = false);
void doClose(BufferID, int whichOne, bool doDeleteBackup = false);
//bool doDelete(const wchar_t *fileName) const {return ::DeleteFile(fileName) != 0;};
void fileOpen();
void fileNew();
@ -216,7 +215,7 @@ public:
void saveCurrentSession();
void saveFindHistory();
void getCurrentOpenedFiles(Session& session, bool includUntitledDoc = false);
void getCurrentOpenedFiles(Session& session, bool includeUntitledDoc = false);
bool fileLoadSession(const wchar_t* fn = nullptr);
const wchar_t * fileSaveSession(size_t nbFile, wchar_t ** fileNames, const wchar_t *sessionFile2save, bool includeFileBrowser = false);
@ -370,15 +369,15 @@ private:
//For Dynamic selection highlight
Sci_CharacterRangeFull _prevSelectedRange;
//Synchronized Scolling
//Synchronized Scrolling
struct SyncInfo final
{
intptr_t _line = 0;
intptr_t _column = 0;
bool _isSynScollV = false;
bool _isSynScollH = false;
bool _isSynScrollV = false;
bool _isSynScrollH = false;
bool doSync() const {return (_isSynScollV || _isSynScollH); }
bool doSync() const {return (_isSynScrollV || _isSynScrollH); }
}
_syncInfo;
@ -424,7 +423,7 @@ private:
UCHAR _mainWindowStatus = 0; //For 2 views and user dialog if docked
int _activeView = MAIN_VIEW;
int _multiSelectFlag = 0; // For sktpping current Multi-select comment
int _multiSelectFlag = 0; // For skipping current Multi-select comment
//User dialog docking
void dockUserDlg();
@ -460,7 +459,7 @@ private:
void docGotoAnotherEditView(FileTransferMode mode); //TransferMode
void docOpenInNewInstance(FileTransferMode mode, int x = 0, int y = 0);
void loadBufferIntoView(BufferID id, int whichOne, bool dontClose = false); //Doesnt _activate_ the buffer
void loadBufferIntoView(BufferID id, int whichOne, bool dontClose = false); //Doesn't _activate_ the buffer
bool removeBufferFromView(BufferID id, int whichOne); //Activates alternative of possible, or creates clean document if not clean already
bool activateBuffer(BufferID id, int whichOne, bool forceApplyHilite = false); //activate buffer in that view if found
@ -587,9 +586,8 @@ private:
bool findInCurrentFile(bool isEntireDoc);
void getMatchedFileNames(const wchar_t *dir, size_t level, const std::vector<std::wstring> & patterns, std::vector<std::wstring> & fileNames, bool isRecursive, bool isInHiddenDir);
void doSynScorll(HWND hW);
void doSynScroll(HWND hW);
void setWorkingDir(const wchar_t *dir);
bool str2Cliboard(const std::wstring & str2cpy);
bool getIntegralDockingData(tTbData & dockData, int & iCont, bool & isVisible);
int getLangFromMenuName(const wchar_t * langName);

View File

@ -451,7 +451,7 @@ BEGIN
MENUITEM "Folder as Workspace", IDM_FILE_CONTAININGFOLDERASWORKSPACE
END
MENUITEM "Open in &Default Viewer", IDM_FILE_OPEN_DEFAULT_VIEWER
MENUITEM "Open Folder as &Workspace...", IDM_FILE_OPENFOLDERASWORSPACE
MENUITEM "Open Folder as &Workspace...", IDM_FILE_OPENFOLDERASWORKSPACE
MENUITEM "Re&load from Disk", IDM_FILE_RELOAD
MENUITEM "&Save", IDM_FILE_SAVE
MENUITEM "Save &As...", IDM_FILE_SAVEAS

View File

@ -99,7 +99,7 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const wchar_t *cmdL
_className,
L"Notepad++",
(WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN),
// CreateWindowEx bug : set all 0 to walk around the pb
// CreateWindowEx bug : set all 0 to walk around the problem
0, 0, 0, 0,
_hParent, nullptr, _hInst,
(LPVOID) this); // pass the ptr of this instantiated object
@ -361,7 +361,7 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const wchar_t *cmdL
_notepad_plus_plus_core.showQuote(&_quoteParams);
}
else if (cmdLineParams->_quoteType == 2) // content drom file
else if (cmdLineParams->_quoteType == 2) // content from file
{
if (doesFileExist(cmdLineParams->_easterEggName.c_str()))
{
@ -404,7 +404,7 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const wchar_t *cmdL
if (isSnapshotMode)
{
_notepad_plus_plus_core.checkModifiedDocument(false);
// Lauch backup task
// Launch backup task
_notepad_plus_plus_core.launchDocumentBackupTask();
}

View File

@ -35,14 +35,14 @@ notepad++ [--help] [-multiInst] [-noPlugin] [-lLanguage] [-udl=\"My UDL Name\"]
-y : Move Notepad++ to indicated top position on the screen\r\
-monitor: Open file with file monitoring enabled\r\
-nosession : Launch Notepad++ without previous session\r\
-notabbar : Launch Notepad++ without tabbar\r\
-notabbar : Launch Notepad++ without tab bar\r\
-ro : Make the filePath read only\r\
-systemtray : Launch Notepad++ directly in system tray\r\
-loadingTime : Display Notepad++ loading time\r\
-alwaysOnTop : Make Notepad++ always on top\r\
-openSession : Open a session. filePath must be a session file\r\
-r : Open files recursively. This argument will be ignored\r\
if filePath contain no wildcard character\r\
if filePath contains no wildcard character\r\
-qn=\"Easter egg name\": Ghost type easter egg via its name\r\
-qt=\"text to display.\": Ghost type the given text\r\
-qf=\"D:\\my quote.txt\": Ghost type a file content via the file path\r\
@ -96,7 +96,7 @@ public:
return _hIconAbsent;
};
static HWND gNppHWND; //static handle to Notepad++ window, NULL if non-existant
static HWND gNppHWND; //static handle to Notepad++ window, NULL if non-existent
void setStartupBgColor(COLORREF BgColor);

View File

@ -180,8 +180,8 @@ LRESULT CALLBACK Notepad_plus_Window::Notepad_plus_Proc(HWND hwnd, UINT message,
{
case WM_NCCREATE:
{
// First message we get the ptr of instantiated object
// then stock it into GWLP_USERDATA index in order to retrieve afterward
// First message we get the pointer of instantiated object
// then store it into GWLP_USERDATA index in order to retrieve afterward
Notepad_plus_Window *pM30ide = static_cast<Notepad_plus_Window *>((reinterpret_cast<LPCREATESTRUCT>(lParam))->lpCreateParams);
pM30ide->_hSelf = hwnd;
::SetWindowLongPtr(hwnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pM30ide));
@ -936,7 +936,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
return TRUE;
}
case NPPM_INTERNAL_PLUGINSHORTCUTMOTIFIED:
case NPPM_INTERNAL_PLUGINSHORTCUTMODIFIED:
{
SCNotification scnN{};
scnN.nmhdr.code = NPPN_SHORTCUTREMAPPED;
@ -983,7 +983,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
else if (message == NPPM_GETEXTPART)
fileStr = PathFindExtension(str);
// For the compability reason, if wParam is 0, then we assume the size of wstring buffer (lParam) is large enough.
// For the compatibility reasons, if wParam is 0, then we assume the size of wstring buffer (lParam) is large enough.
// otherwise we check if the wstring buffer size is enough for the wstring to copy.
if (wParam != 0)
{
@ -1009,7 +1009,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
else if (message == NPPM_GETCURRENTLINESTR)
_pEditView->getLine(_pEditView->getCurrentLineNumber(), str, strSize);
// For the compability reason, if wParam is 0, then we assume the size of wstring buffer (lParam) is large enough.
// For the compatibility reason, if wParam is 0, then we assume the size of wstring buffer (lParam) is large enough.
// otherwise we check if the wstring buffer size is enough for the wstring to copy.
if (wParam != 0)
{
@ -1093,7 +1093,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
if (message == NPPM_GETNPPDIRECTORY)
PathRemoveFileSpec(str);
// For the compability reason, if wParam is 0, then we assume the size of wstring buffer (lParam) is large enough.
// For the compatibility reason, if wParam is 0, then we assume the size of wstring buffer (lParam) is large enough.
// otherwise we check if the wstring buffer size is enough for the wstring to copy.
if (wParam != 0)
{
@ -1378,7 +1378,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
// clean buffer
delete [] buffer;
// set new encoding if BOM was changed by other programms
// set new encoding if BOM was changed by other programs
UniMode um = UnicodeConvertor.getEncoding();
(pSci->getCurrentBuffer())->setUnicodeMode(um);
(pSci->getCurrentBuffer())->setDirty(true);
@ -1644,7 +1644,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
// The deallocated scintilla view in _referees is used in Buffer::nextUntitledNewNumber().
// So we do nothing here and let Notepad++ destroy allocated Scintilla while it exits
// and we keep this message for the sake of compability withe the existing plugins.
// and we keep this message for the sake of compatibility with the existing plugins.
return true;
}
@ -2797,7 +2797,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
if (nppgui._rememberLastSession)
{
//Lock the recent file list so it isnt populated with opened files
//Lock the recent file list so it isn't populated with opened files
//Causing them to show on restart even though they are loaded by session
_lastRecentFileList.setLock(true); //only lock when the session is remembered
}
@ -3700,7 +3700,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
size_t nbColAdded = 0;
for (auto i : svp._edgeMultiColumnPos)
{
// it's absurd to set columns beyon 8000, even it's a long line.
// it's absurd to set columns beyond 8000, even it's a long line.
// So let's ignore all the number greater than 2^13
if (i > twoPower13)
continue;
@ -4047,7 +4047,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
}
break;
case NPPM_INTERNAL_DRAWINACIVETAB:
case NPPM_INTERNAL_DRAWINACTIVETAB:
case NPPM_INTERNAL_DRAWTABTOPBAR:
{
TabBarPlus::triggerOwnerDrawTabbar(&(_mainDocTab.dpiManager()));
@ -4071,7 +4071,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
case NPPM_INTERNAL_REDUCETABBAR:
{
TabBarPlus::triggerOwnerDrawTabbar(&(_mainDocTab.dpiManager()));
bool isReduceed = nppParam.getNppGUI()._tabStatus & TAB_REDUCE;
bool isReduced = nppParam.getNppGUI()._tabStatus & TAB_REDUCE;
//Resize the tab height
NppGUI& nppGUI = NppParameters::getInstance().getNppGUI();
@ -4079,13 +4079,13 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
bool drawTabPinButton = nppGUI._tabStatus & TAB_PINBUTTON;
int tabDpiDynamicalWidth = _mainDocTab.dpiManager().scale((drawTabCloseButton || drawTabPinButton) ? g_TabWidthButton : g_TabWidth);
int tabDpiDynamicalHeight = _mainDocTab.dpiManager().scale(isReduceed ? g_TabHeight : g_TabHeightLarge);
int tabDpiDynamicalHeight = _mainDocTab.dpiManager().scale(isReduced ? g_TabHeight : g_TabHeightLarge);
TabCtrl_SetItemSize(_mainDocTab.getHSelf(), tabDpiDynamicalWidth, tabDpiDynamicalHeight);
TabCtrl_SetItemSize(_subDocTab.getHSelf(), tabDpiDynamicalWidth, tabDpiDynamicalHeight);
//change the font
const auto& hf = _mainDocTab.getFont(isReduceed);
const auto& hf = _mainDocTab.getFont(isReduced);
if (hf)
{
::SendMessage(_mainDocTab.getHSelf(), WM_SETFONT, reinterpret_cast<WPARAM>(hf), MAKELPARAM(TRUE, 0));

View File

@ -191,7 +191,7 @@ void Notepad_plus::command(int id)
}
break;
case IDM_FILE_OPENFOLDERASWORSPACE:
case IDM_FILE_OPENFOLDERASWORKSPACE:
{
const NativeLangSpeaker* pNativeSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
wstring openWorkspaceStr = pNativeSpeaker->getAttrNameStr(L"Select a folder to add in Folder as Workspace panel",
@ -581,8 +581,8 @@ void Notepad_plus::command(int id)
return;
HWND hwnd = _pPublicInterface->getHSelf();
wchar_t curentWord[CURRENTWORD_MAXLENGTH] = { '\0' };
::SendMessage(hwnd, NPPM_GETFILENAMEATCURSOR, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(curentWord));
wchar_t currentWord[CURRENTWORD_MAXLENGTH] = { '\0' };
::SendMessage(hwnd, NPPM_GETFILENAMEATCURSOR, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentWord));
wchar_t cmd2Exec[CURRENTWORD_MAXLENGTH] = { '\0' };
if (id == IDM_EDIT_OPENINFOLDER)
@ -595,15 +595,15 @@ void Notepad_plus::command(int id)
}
// Full file path: could be a folder or a file
if (doesPathExist(curentWord))
if (doesPathExist(currentWord))
{
wstring fullFilePath = id == IDM_EDIT_OPENINFOLDER ? L"/select," : L"";
fullFilePath += L"\"";
fullFilePath += curentWord;
fullFilePath += currentWord;
fullFilePath += L"\"";
if (id == IDM_EDIT_OPENINFOLDER ||
(id == IDM_EDIT_OPENASFILE && !doesDirectoryExist(curentWord)))
(id == IDM_EDIT_OPENASFILE && !doesDirectoryExist(currentWord)))
::ShellExecute(hwnd, L"open", cmd2Exec, fullFilePath.c_str(), L".", SW_SHOW);
}
else // Relative file path - need concatenate with current full file path
@ -615,7 +615,7 @@ void Notepad_plus::command(int id)
fullFilePath += L"\"";
fullFilePath += currentDir;
fullFilePath += L"\\";
fullFilePath += curentWord;
fullFilePath += currentWord;
if ((id == IDM_EDIT_OPENASFILE &&
(!doesFileExist(fullFilePath.c_str() + 1)))) // + 1 for skipping the 1st char '"'
@ -1299,17 +1299,17 @@ void Notepad_plus::command(int id)
Buffer * buf = _pEditView->getCurrentBuffer();
if (id == IDM_EDIT_FULLPATHTOCLIP)
{
str2Cliboard(buf->getFullPathName());
str2Clipboard(buf->getFullPathName(), _pPublicInterface->getHSelf());
}
else if (id == IDM_EDIT_CURRENTDIRTOCLIP)
{
wstring dir(buf->getFullPathName());
pathRemoveFileSpec(dir);
str2Cliboard(dir);
str2Clipboard(dir, _pPublicInterface->getHSelf());
}
else if (id == IDM_EDIT_FILENAMETOCLIP)
{
str2Cliboard(buf->getFileName());
str2Clipboard(buf->getFileName(), _pPublicInterface->getHSelf());
}
}
break;
@ -2333,7 +2333,7 @@ void Notepad_plus::command(int id)
{
// Try the Legacy version
// Don't put the quots for Edge, otherwise it doesn't work
// Don't put the quotes for Edge, otherwise it doesn't work
//fullCurrentPath = L"\"";
fullCurrentPath = currentBuf->getFullPathName();
//fullCurrentPath += L"\"";
@ -2496,22 +2496,22 @@ void Notepad_plus::command(int id)
case IDM_VIEW_WRAP:
{
bool isWraped = !_pEditView->isWrap();
bool isWrapped = !_pEditView->isWrap();
// ViewMoveAtWrappingDisableFix: Disable wrapping messes up visible lines. Therefore save view position before in IDM_VIEW_WRAP and restore after SCN_PAINTED, as Scintilla-Doc. says
if (!isWraped)
if (!isWrapped)
{
_mainEditView.saveCurrentPos();
_mainEditView.setWrapRestoreNeeded(true);
_subEditView.saveCurrentPos();
_subEditView.setWrapRestoreNeeded(true);
}
_mainEditView.wrap(isWraped);
_subEditView.wrap(isWraped);
_toolBar.setCheck(IDM_VIEW_WRAP, isWraped);
checkMenuItem(IDM_VIEW_WRAP, isWraped);
_mainEditView.wrap(isWrapped);
_subEditView.wrap(isWrapped);
_toolBar.setCheck(IDM_VIEW_WRAP, isWrapped);
checkMenuItem(IDM_VIEW_WRAP, isWrapped);
ScintillaViewParams & svp1 = (ScintillaViewParams &)(NppParameters::getInstance()).getSVP();
svp1._doWrap = isWraped;
svp1._doWrap = isWrapped;
if (_pDocMap)
{
@ -2553,13 +2553,13 @@ void Notepad_plus::command(int id)
case IDM_VIEW_SYNSCROLLV:
{
bool isSynScollV = !_syncInfo._isSynScollV;
bool isSynScrollV = !_syncInfo._isSynScrollV;
checkMenuItem(IDM_VIEW_SYNSCROLLV, isSynScollV);
_toolBar.setCheck(IDM_VIEW_SYNSCROLLV, isSynScollV);
checkMenuItem(IDM_VIEW_SYNSCROLLV, isSynScrollV);
_toolBar.setCheck(IDM_VIEW_SYNSCROLLV, isSynScrollV);
_syncInfo._isSynScollV = isSynScollV;
if (_syncInfo._isSynScollV)
_syncInfo._isSynScrollV = isSynScrollV;
if (_syncInfo._isSynScrollV)
{
intptr_t mainCurrentLine = _mainEditView.execute(SCI_GETFIRSTVISIBLELINE);
intptr_t subCurrentLine = _subEditView.execute(SCI_GETFIRSTVISIBLELINE);
@ -2571,12 +2571,12 @@ void Notepad_plus::command(int id)
case IDM_VIEW_SYNSCROLLH:
{
bool isSynScollH = !_syncInfo._isSynScollH;
checkMenuItem(IDM_VIEW_SYNSCROLLH, isSynScollH);
_toolBar.setCheck(IDM_VIEW_SYNSCROLLH, isSynScollH);
bool isSynScrollH = !_syncInfo._isSynScrollH;
checkMenuItem(IDM_VIEW_SYNSCROLLH, isSynScrollH);
_toolBar.setCheck(IDM_VIEW_SYNSCROLLH, isSynScrollH);
_syncInfo._isSynScollH = isSynScollH;
if (_syncInfo._isSynScollH)
_syncInfo._isSynScrollH = isSynScrollH;
if (_syncInfo._isSynScrollH)
{
intptr_t mxoffset = _mainEditView.execute(SCI_GETXOFFSET);
intptr_t pixel = _mainEditView.execute(SCI_TEXTWIDTH, STYLE_DEFAULT, reinterpret_cast<LPARAM>("P"));
@ -2746,11 +2746,11 @@ void Notepad_plus::command(int id)
Buffer * buf = _pEditView->getCurrentBuffer();
UniMode um;
bool shoulBeDirty = true;
bool shouldBeDirty = true;
switch (id)
{
case IDM_FORMAT_AS_UTF_8:
shoulBeDirty = buf->getUnicodeMode() != uni8Bit;
shouldBeDirty = buf->getUnicodeMode() != uni8Bit;
um = uniCookie;
break;
@ -2767,7 +2767,7 @@ void Notepad_plus::command(int id)
break;
default : // IDM_FORMAT_ANSI
shoulBeDirty = buf->getUnicodeMode() != uniCookie;
shouldBeDirty = buf->getUnicodeMode() != uniCookie;
um = uni8Bit;
}
@ -2777,7 +2777,7 @@ void Notepad_plus::command(int id)
{
int answer = _nativeLangSpeaker.messageBox("SaveCurrentModifWarning",
_pPublicInterface->getHSelf(),
L"You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?",
L"You should save the current modification.\rAll the saved modifications cannot be undone.\r\rContinue?",
L"Save Current Modification",
MB_YESNO);
@ -2794,8 +2794,8 @@ void Notepad_plus::command(int id)
{
int answer = _nativeLangSpeaker.messageBox("LoseUndoAbilityWarning",
_pPublicInterface->getHSelf(),
L"You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?",
L"Lose Undo Ability Waning",
L"You should save the current modification.\rAll the saved modifications cannot be undone.\r\rContinue?",
L"Lose Undo Ability Warning",
MB_YESNO);
if (answer == IDYES)
{
@ -2818,7 +2818,7 @@ void Notepad_plus::command(int id)
if (buf->getUnicodeMode() != um)
{
buf->setUnicodeMode(um);
if (shoulBeDirty)
if (shouldBeDirty)
buf->setDirty(true);
}
}
@ -2887,7 +2887,7 @@ void Notepad_plus::command(int id)
{
int answer = _nativeLangSpeaker.messageBox("SaveCurrentModifWarning",
_pPublicInterface->getHSelf(),
L"You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?",
L"You should save the current modification.\rAll the saved modifications cannot be undone.\r\rContinue?",
L"Save Current Modification",
MB_YESNO);
@ -2904,8 +2904,8 @@ void Notepad_plus::command(int id)
{
int answer = _nativeLangSpeaker.messageBox("LoseUndoAbilityWarning",
_pPublicInterface->getHSelf(),
L"You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?",
L"Lose Undo Ability Waning",
L"You should save the current modification.\rAll the saved modifications cannot be undone.\r\rContinue?",
L"Lose Undo Ability Warning",
MB_YESNO);
if (answer != IDYES)
@ -3232,7 +3232,7 @@ void Notepad_plus::command(int id)
if (isFirstTime)
{
_nativeLangSpeaker.changePrefereceDlgLang(_preference);
_nativeLangSpeaker.changePreferenceDlgLang(_preference);
}
break;
}
@ -3540,7 +3540,7 @@ void Notepad_plus::command(int id)
case IDM_CMDLINEARGUMENTS:
{
// No translattable
// Not translatable
::MessageBox(_pPublicInterface->getHSelf(), COMMAND_ARG_HELP, L"Notepad++ Command Argument Help", MB_OK | MB_APPLMODAL);
break;
}
@ -3554,7 +3554,7 @@ void Notepad_plus::command(int id)
case IDM_UPDATE_NPP :
case IDM_CONFUPDATERPROXY :
{
// wingup doesn't work with the obsolete security layer (API) under xp since downloadings are secured with SSL on notepad_plus_plus.org
// wingup doesn't work with the obsolete security layer (API) under xp since downloads are secured with SSL on notepad_plus_plus.org
winVer ver = NppParameters::getInstance().getWinVersion();
if (ver <= WV_XP)
{
@ -3856,9 +3856,9 @@ void Notepad_plus::command(int id)
_pEditView->changeTextDirection(toRTL);
// Wrap then !wrap to fix problem of mirror characters
bool isWraped = _pEditView->isWrap();
_pEditView->wrap(!isWraped);
_pEditView->wrap(isWraped);
bool isWrapped = _pEditView->isWrap();
_pEditView->wrap(!isWrapped);
_pEditView->wrap(isWrapped);
if (_pDocMap)
{

View File

@ -530,7 +530,7 @@ BufferID Notepad_plus::doOpen(const wstring& fileName, bool isRecursive, bool is
{
_nativeLangSpeaker.messageBox("OpenFileError",
_pPublicInterface->getHSelf(),
L"Can not open file \"$STR_REPLACE$\".",
L"Cannot open file \"$STR_REPLACE$\".",
L"ERROR",
MB_OK,
0,
@ -890,7 +890,7 @@ void Notepad_plus::doClose(BufferID id, int whichOne, bool doDeleteBackup)
scnN.nmhdr.code = NPPN_FILECLOSED;
_pluginsManager.notify(&scnN);
// The document could be clonned.
// The document could be cloned.
// if the same buffer ID is not found then remove the entry from File Switcher Panel
if (_pDocumentListPanel)
{
@ -1101,7 +1101,7 @@ bool Notepad_plus::fileClose(BufferID id, int curView)
if (curView != -1)
viewToClose = curView;
// Determinate if it's a cloned buffer
// Determine if it's a cloned buffer
DocTabView* nonCurrentTab = (viewToClose == MAIN_VIEW) ? &_subDocTab : &_mainDocTab;
bool isCloned = nonCurrentTab->getIndexByBuffer(bufferID) != -1;
@ -1171,7 +1171,7 @@ bool Notepad_plus::fileCloseAll(bool doDeleteBackup, bool isSnapshotMode)
BufferID id = _mainDocTab.getBufferByIndex(i);
Buffer * buf = MainFileManager.getBufferByID(id);
// Put all the BufferID from main vaiew to hash table
// Put all the BufferID from main view to hash table
// hash table is used for fast searching
uniqueBuffers.insert(id);
@ -1399,7 +1399,7 @@ bool Notepad_plus::fileCloseAllGiven(const std::vector<BufferViewInfo>& fileInfo
* IDRETRY : Yes to All
* IDNO : No
* IDIGNORE : No To All
* IDCANCEL : Cancel Opration
* IDCANCEL : Cancel Operation
*/
int res = saveToAll ? IDYES : doSaveOrNot(buf->getFullPathName(), nbDirtyFiles > 1);
@ -1698,7 +1698,7 @@ bool Notepad_plus::fileCloseAllButCurrent()
size_t nbItems = _pDocTab->nbItem();
activateBuffer(_pDocTab->getBufferByIndex(0), viewNo);
// After activateBuffer() call, if file is deleteed, user will decide to keep or not the tab
// After activateBuffer() call, if file is deleted, user will decide to keep or not the tab
// So here we check if the 1st tab is closed or not
size_t newNbItems = _pDocTab->nbItem();
@ -1710,7 +1710,7 @@ bool Notepad_plus::fileCloseAllButCurrent()
for (int32_t i = static_cast<int32_t>(newNbItems) - 1; i >= 0; i--) //close all from right to left
{
if (i == active) //dont close active index
if (i == active) //don't close active index
{
continue;
}
@ -1805,7 +1805,7 @@ bool Notepad_plus::fileSave(BufferID id)
{
int res = _nativeLangSpeaker.messageBox("FileBackupFailed",
_pPublicInterface->getHSelf(),
L"The previous version of the file could not be saved into the backup directory at \"$STR_REPLACE$\".\r\rDo you want to save the current file anyways?",
L"The previous version of the file could not be saved into the backup directory at \"$STR_REPLACE$\".\r\rDo you want to save the current file anyway?",
L"File Backup Failed",
MB_YESNO | MB_ICONERROR,
0,
@ -2086,7 +2086,7 @@ bool Notepad_plus::fileRename(BufferID id)
if (tabNewName)
{
wstring tabNewNameStr = tabNewName;
trim(tabNewNameStr); // No leading and tailing space allowed
trim(tabNewNameStr); // No leading and trailing space allowed
BufferID sameNamedBufferId = _pDocTab->findBufferByName(tabNewNameStr.c_str());
if (sameNamedBufferId == BUFFER_INVALID)
@ -2165,7 +2165,7 @@ bool Notepad_plus::fileRenameUntitledPluginAPI(BufferID id, const wchar_t* tabNe
std::wstring tabNewNameStr = tabNewName;
trim(tabNewNameStr); // No leading and tailing space allowed
trim(tabNewNameStr); // No leading and trailing space allowed
if (tabNewNameStr.empty()) return false;
@ -2230,7 +2230,7 @@ bool Notepad_plus::fileDelete(BufferID id)
bool goAhead = true;
if (winVersion >= WV_WIN8 || winVersion == WV_UNKNOWN)
{
// Windows 8 (and version afer?) has no system alert, so we ask user's confirmation
// Windows 8 (and version after?) has no system alert, so we ask user's confirmation
goAhead = (doDeleteOrNot(fileNamePath) == IDOK);
}
@ -2473,7 +2473,7 @@ bool Notepad_plus::loadSession(Session & session, bool isSnapshotMode, const wch
if (session._mainViewFiles[i]._foldStates.size() > 0)
{
if (buf == _mainEditView.getCurrentBuffer()) // current document
// Set floding state in the current doccument
// Set folding state in the current document
mainIndex2Update = static_cast<int32_t>(i);
else
// Set fold states in the buffer
@ -2602,7 +2602,7 @@ bool Notepad_plus::loadSession(Session & session, bool isSnapshotMode, const wch
if (session._subViewFiles[k]._foldStates.size() > 0)
{
if (buf == _subEditView.getCurrentBuffer()) // current document
// Set floding state in the current doccument
// Set folding state in the current document
subIndex2Update = static_cast<int32_t>(k);
else
// Set fold states in the buffer

View File

@ -114,7 +114,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
isDirty = true;
}
if (buf->isUnsync()) // buffer in Notepad++ is not syncronized with the file on disk - in this case the buffer is always dirty
if (buf->isUnsync()) // buffer in Notepad++ is not synchronized with the file on disk - in this case the buffer is always dirty
isDirty = true;
if (buf->isSavePointDirty())
@ -404,7 +404,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
if (nppParam._isFindReplacing)
break;
if (notification->nmhdr.hwndFrom != _pEditView->getHSelf() && currentBuf->allowSmartHilite()) // notification come from unfocus view - both views ae visible
if (notification->nmhdr.hwndFrom != _pEditView->getHSelf() && currentBuf->allowSmartHilite()) // notification come from unfocus view - both views are visible
{
if (nppGui._smartHiliteOnAnotherView)
{
@ -429,8 +429,8 @@ BOOL Notepad_plus::notify(SCNotification *notification)
nppGui._disableSmartHiliteTmp = false;
else
{
ScintillaEditView* anbotherView = isFromPrimary ? &_subEditView : &_mainEditView;
_smartHighlighter.highlightView(notifyView, anbotherView);
ScintillaEditView* anotherView = isFromPrimary ? &_subEditView : &_mainEditView;
_smartHighlighter.highlightView(notifyView, anotherView);
}
}
@ -497,7 +497,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
notifyView->updateLineNumberWidth();
if (_syncInfo.doSync())
doSynScorll(HWND(notification->nmhdr.hwndFrom));
doSynScroll(HWND(notification->nmhdr.hwndFrom));
const NppParameters& nppParam = NppParameters::getInstance();
@ -777,7 +777,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
BufferID bufferToClose2ndCheck = notifyDocTab->getBufferByIndex(index);
if ((bufferToClose == bufferToClose2ndCheck) // Here we make sure the buffer is the same to prevent from the situation that the buffer to be close was already closed,
// because the precedent call "activateBuffer(bufferToClose, iView)" could finally lead "doClose" call as well (in case of file non-existent).
// because the preceding call "activateBuffer(bufferToClose, iView)" could finally lead "doClose" call as well (in case of file non-existent).
&& fileClose(bufferToClose, iView))
checkDocState();
@ -1229,7 +1229,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
pt.x = lpnm->rc.left;
pt.y = lpnm->rc.bottom;
ClientToScreen(notifRebar->getHSelf(), &pt);
_toolBar.doPopop(pt);
_toolBar.doPopup(pt);
return TRUE;
}

View File

@ -62,7 +62,7 @@ static const WinMenuKeyDefinition winKeyDefs[] =
{ VK_NULL, IDM_FILE_OPEN_FOLDER, false, false, false, L"Open containing folder in Explorer" },
{ VK_NULL, IDM_FILE_OPEN_CMD, false, false, false, L"Open containing folder in Command Prompt" },
{ VK_NULL, IDM_FILE_OPEN_DEFAULT_VIEWER, false, false, false, nullptr },
{ VK_NULL, IDM_FILE_OPENFOLDERASWORSPACE, false, false, false, nullptr },
{ VK_NULL, IDM_FILE_OPENFOLDERASWORKSPACE, false, false, false, nullptr },
{ VK_R, IDM_FILE_RELOAD, true, false, false, nullptr },
{ VK_S, IDM_FILE_SAVE, true, false, false, nullptr },
{ VK_S, IDM_FILE_SAVEAS, true, true, false, nullptr },
@ -470,7 +470,7 @@ struct ScintillaKeyDefinition
bool isAlt = false;
bool isShift = false;
int vKey = 0;
int redirFunctionId = 0; // this gets set when a function is being redirected through Notepad++ if Scintilla doesnt do it properly :)
int redirFunctionId = 0; // this gets set when a function is being redirected through Notepad++ if Scintilla doesn't do it properly :)
};
/*!
@ -781,7 +781,7 @@ int DynamicMenu::getTopLevelItemNumber() const
}
else if (previousFolderName == i._parentFolderName)
{
// maintain the number and do nothinh
// maintain the number and do nothing
}
else
{
@ -1152,7 +1152,7 @@ bool NppParameters::load()
std::wstring localConfPath(_nppPath);
pathAppend(localConfPath, localConfFile);
// Test if localConf.xml exist
// Test if doLocalConf.xml exists
_isLocal = (doesFileExist(localConfPath.c_str()) == TRUE);
// Under vista and windows 7, the usage of doLocalConf.xml is not allowed
@ -1215,14 +1215,14 @@ bool NppParameters::load()
if (!doesDirectoryExist(_pluginRootDir.c_str()))
::CreateDirectory(_pluginRootDir.c_str(), NULL);
_sessionPath = _userPath; // Session stock the absolute file path, it should never be on cloud
_sessionPath = _userPath; // Session stores the absolute file path, it should never be on cloud
// Detection cloud settings
std::wstring cloudChoicePath{_userPath};
cloudChoicePath += L"\\cloud\\choice";
//
// the 2nd priority: cloud Choice Path
// the 2nd priority: Cloud Choice Path
//
_isCloud = doesFileExist(cloudChoicePath.c_str());
if (_isCloud)
@ -1252,7 +1252,7 @@ bool NppParameters::load()
if (!doesDirectoryExist(_cmdSettingsDir.c_str()))
{
// The following text is not translatable.
// _pNativeLangSpeaker is initialized AFTER _userPath being dterminated because nativeLang.xml is from from _userPath.
// _pNativeLangSpeaker is initialized AFTER _userPath being determined because nativeLang.xml is from _userPath.
std::wstring errMsg = L"The given path\r";
errMsg += _cmdSettingsDir;
errMsg += L"\nvia command line \"-settingsDir=\" is not a valid directory.\rThis argument will be ignored.";
@ -1266,7 +1266,7 @@ bool NppParameters::load()
}
//--------------------------//
// langs.xml : for per user //
// langs.xml : for per-user //
//--------------------------//
std::wstring langs_xml_path(_userPath);
pathAppend(langs_xml_path, L"langs.xml");
@ -1332,7 +1332,7 @@ bool NppParameters::load()
getLangKeywordsFromXmlTree();
//---------------------------//
// config.xml : for per user //
// config.xml : for per-user //
//---------------------------//
std::wstring configPath(_userPath);
pathAppend(configPath, L"config.xml");
@ -1357,7 +1357,7 @@ bool NppParameters::load()
}
//----------------------------//
// stylers.xml : for per user //
// stylers.xml : for per-user //
//----------------------------//
_stylerPath = _userPath;
@ -1405,7 +1405,7 @@ bool NppParameters::load()
_themeSwitcher.addDefaultThemeFromXml(_stylerPath);
//-----------------------------------//
// userDefineLang.xml : for per user //
// userDefineLang.xml : for per-user //
//-----------------------------------//
_userDefineLangsFolderPath = _userDefineLangPath = _userPath;
pathAppend(_userDefineLangPath, L"userDefineLang.xml");
@ -1446,7 +1446,7 @@ bool NppParameters::load()
}
//----------------------------------------------//
// nativeLang.xml : for per user //
// nativeLang.xml : for per-user //
// In case of absence of user's nativeLang.xml, //
// We'll look in the Notepad++ Dir. //
//----------------------------------------------//
@ -1486,7 +1486,7 @@ bool NppParameters::load()
}
//---------------------------------------//
// toolbarButtonsConf.xml : for per user //
// toolbarButtonsConf.xml : for per-user //
//---------------------------------------//
std::wstring toolbarButtonsConfXmlPath(_userPath);
pathAppend(toolbarButtonsConfXmlPath, L"toolbarButtonsConf.xml");
@ -1501,7 +1501,7 @@ bool NppParameters::load()
}
//------------------------------//
// shortcuts.xml : for per user //
// shortcuts.xml : for per-user //
//------------------------------//
wstring v852NoNeedShortcutsBackup;
_shortcutsPath = v852NoNeedShortcutsBackup = _userPath;
@ -1515,7 +1515,7 @@ bool NppParameters::load()
::CopyFile(srcShortcutsPath.c_str(), _shortcutsPath.c_str(), TRUE);
// Creat empty file v852NoNeedShortcutsBackup.xml for not giving warning, neither doing backup, in future use.
// Create empty file v852NoNeedShortcutsBackup.xml for not giving warning, neither doing backup, in future use.
HANDLE hFile = ::CreateFile(v852NoNeedShortcutsBackup.c_str(), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
::FlushFileBuffers(hFile);
::CloseHandle(hFile);
@ -1536,12 +1536,12 @@ bool NppParameters::load()
getUserCmdsFromXmlTree();
// fill out _scintillaModifiedKeys :
// those user defined Scintilla key will be used remap Scintilla Key Array
// those user-defined Scintilla keys will be used to remap the Scintilla Key Array
getScintKeysFromXmlTree();
}
//---------------------------------//
// contextMenu.xml : for per user //
// contextMenu.xml : for per-user //
//---------------------------------//
_contextMenuPath = _userPath;
pathAppend(_contextMenuPath, L"contextMenu.xml");
@ -1564,7 +1564,7 @@ bool NppParameters::load()
}
//---------------------------------------------//
// tabContextMenu.xml : for per user, optional //
// tabContextMenu.xml : for per-user, optional //
//---------------------------------------------//
_tabContextMenuPath = _userPath;
pathAppend(_tabContextMenuPath, L"tabContextMenu.xml");
@ -1578,7 +1578,7 @@ bool NppParameters::load()
}
//----------------------------//
// session.xml : for per user //
// session.xml : for per-user //
//----------------------------//
pathAppend(_sessionPath, L"session.xml");
@ -1730,7 +1730,7 @@ void NppParameters::setWorkSpaceFilePath(int i, const wchar_t* wsFile)
{
if (i < 0 || i > 2 || !wsFile)
return;
_workSpaceFilePathes[i] = wsFile;
_workSpaceFilePaths[i] = wsFile;
}
@ -2101,23 +2101,23 @@ void NppParameters::initScintillaKeys()
}
}
bool NppParameters::reloadContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU pluginsMenu)
bool NppParameters::reloadContextMenuFromXmlTree(HMENU mainMenuHandle, HMENU pluginsMenu)
{
_contextMenuItems.clear();
return getContextMenuFromXmlTree(mainMenuHadle, pluginsMenu);
return getContextMenuFromXmlTree(mainMenuHandle, pluginsMenu);
}
int NppParameters::getCmdIdFromMenuEntryItemName(HMENU mainMenuHadle, const std::wstring& menuEntryName, const std::wstring& menuItemName)
int NppParameters::getCmdIdFromMenuEntryItemName(HMENU mainMenuHandle, const std::wstring& menuEntryName, const std::wstring& menuItemName)
{
int nbMenuEntry = ::GetMenuItemCount(mainMenuHadle);
int nbMenuEntry = ::GetMenuItemCount(mainMenuHandle);
for (int i = 0; i < nbMenuEntry; ++i)
{
wchar_t menuEntryString[menuItemStrLenMax];
::GetMenuString(mainMenuHadle, i, menuEntryString, menuItemStrLenMax, MF_BYPOSITION);
::GetMenuString(mainMenuHandle, i, menuEntryString, menuItemStrLenMax, MF_BYPOSITION);
if (wcsicmp(menuEntryName.c_str(), purgeMenuItemString(menuEntryString).c_str()) == 0)
{
vector< pair<HMENU, int> > parentMenuPos;
HMENU topMenu = ::GetSubMenu(mainMenuHadle, i);
HMENU topMenu = ::GetSubMenu(mainMenuHandle, i);
int maxTopMenuPos = ::GetMenuItemCount(topMenu);
HMENU currMenu = topMenu;
int currMaxMenuPos = maxTopMenuPos;
@ -2192,7 +2192,7 @@ int NppParameters::getPluginCmdIdFromMenuEntryItemName(HMENU pluginsMenu, const
return -1;
}
bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU pluginsMenu, bool isEditCM)
bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHandle, HMENU pluginsMenu, bool isEditCM)
{
TiXmlDocumentA* pXmlContextMenuDocA = isEditCM ? _pXmlContextMenuDocA : _pXmlTabContextMenuDocA;
std::string cmName = isEditCM ? "ScintillaContextMenu" : "TabContextMenu";
@ -2247,7 +2247,7 @@ bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU plugins
if (!menuEntryName.empty() && !menuItemName.empty())
{
int cmd = getCmdIdFromMenuEntryItemName(mainMenuHadle, menuEntryName, menuItemName);
int cmd = getCmdIdFromMenuEntryItemName(mainMenuHandle, menuEntryName, menuItemName);
if (cmd != -1)
contextMenuItems.push_back(MenuItemUnit(cmd, displayAs.c_str(), folderName.c_str()));
}
@ -2261,7 +2261,7 @@ bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU plugins
pluginName = pluginNameA ? wmc.char2wchar(pluginNameA, SC_CP_UTF8) : L"";
pluginCmdName = pluginCmdNameA ? wmc.char2wchar(pluginCmdNameA, SC_CP_UTF8) : L"";
// if plugin menu existing plls the value of PluginEntryName and PluginCommandItemName are valid
// if plugin menu exists, also the value of PluginEntryName and PluginCommandItemName are valid
if (pluginsMenu && !pluginName.empty() && !pluginCmdName.empty())
{
int pluginCmdId = getPluginCmdIdFromMenuEntryItemName(pluginsMenu, pluginName, pluginCmdName);
@ -2592,7 +2592,7 @@ void NppParameters::feedProjectPanelsParameters(TiXmlNode *node)
const wchar_t *filePath = (childNode->ToElement())->Attribute(L"workSpaceFile");
if (filePath)
{
_workSpaceFilePathes[index] = filePath;
_workSpaceFilePaths[index] = filePath;
}
}
}
@ -2763,7 +2763,7 @@ void NppParameters::feedFindHistoryParameters(TiXmlNode *node)
boolStr = (findHistoryRoot->ToElement())->Attribute(L"fifRecuisive");
if (boolStr)
_findHistory._isFifRecuisive = (lstrcmp(L"yes", boolStr) == 0);
_findHistory._isFifRecursive = (lstrcmp(L"yes", boolStr) == 0);
boolStr = (findHistoryRoot->ToElement())->Attribute(L"fifInHiddenFolder");
if (boolStr)
@ -3791,7 +3791,7 @@ void NppParameters::writeShortcuts()
if (!doesFileExist(v852NoNeedShortcutsBackup))
{
// Creat empty file v852NoNeedShortcutsBackup.xml for not giving warning, neither doing backup, in future use.
// Create empty file v852NoNeedShortcutsBackup.xml for not giving warning, neither doing backup, in future use.
HANDLE hFile = ::CreateFile(v852NoNeedShortcutsBackup, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
::FlushFileBuffers(hFile);
::CloseHandle(hFile);
@ -4403,7 +4403,7 @@ bool NppParameters::writeProjectPanelsSettings() const
{
TiXmlElement projPanelNode{L"ProjectPanel"};
(projPanelNode.ToElement())->SetAttribute(L"id", i);
(projPanelNode.ToElement())->SetAttribute(L"workSpaceFile", _workSpaceFilePathes[i]);
(projPanelNode.ToElement())->SetAttribute(L"workSpaceFile", _workSpaceFilePaths[i]);
(projPanelRootNode.ToElement())->InsertEndChild(projPanelNode);
}
@ -4474,18 +4474,18 @@ bool NppParameters::writeHistory(const wchar_t *fullpath)
return true;
}
TiXmlNode * NppParameters::getChildElementByAttribut(TiXmlNode *pere, const wchar_t *childName,\
const wchar_t *attributName, const wchar_t *attributVal) const
TiXmlNode * NppParameters::getChildElementByAttribute(TiXmlNode *pere, const wchar_t *childName,\
const wchar_t *attributeName, const wchar_t *attributeVal) const
{
for (TiXmlNode *childNode = pere->FirstChildElement(childName);
childNode ;
childNode = childNode->NextSibling(childName))
{
TiXmlElement *element = childNode->ToElement();
const wchar_t *val = element->Attribute(attributName);
const wchar_t *val = element->Attribute(attributeName);
if (val)
{
if (!lstrcmp(val, attributVal))
if (!lstrcmp(val, attributeVal))
return childNode;
}
}
@ -5347,7 +5347,7 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
if (!lstrcmp(val, L"vertical"))
_nppGUI._splitterPos = POS_VERTICAL;
else if (!lstrcmp(val, L"horizontal"))
_nppGUI._splitterPos = POS_HORIZOTAL;
_nppGUI._splitterPos = POS_HORIZONTAL;
}
}
}
@ -7119,7 +7119,7 @@ bool NppParameters::writeScintillaParams()
configsRoot = nppRoot->InsertEndChild(TiXmlElement(L"GUIConfigs"));
}
TiXmlNode *scintNode = getChildElementByAttribut(configsRoot, L"GUIConfig", L"name", pViewName);
TiXmlNode *scintNode = getChildElementByAttribute(configsRoot, L"GUIConfig", L"name", pViewName);
if (!scintNode)
{
scintNode = configsRoot->InsertEndChild(TiXmlElement(L"GUIConfig"));
@ -7925,7 +7925,7 @@ bool NppParameters::writeFindHistory()
(findHistoryRoot->ToElement())->SetAttribute(L"wrap", _findHistory._isWrap?L"yes" : L"no");
(findHistoryRoot->ToElement())->SetAttribute(L"directionDown", _findHistory._isDirectionDown ? L"yes" : L"no");
(findHistoryRoot->ToElement())->SetAttribute(L"fifRecuisive", _findHistory._isFifRecuisive ? L"yes" : L"no");
(findHistoryRoot->ToElement())->SetAttribute(L"fifRecuisive", _findHistory._isFifRecursive ? L"yes" : L"no");
(findHistoryRoot->ToElement())->SetAttribute(L"fifInHiddenFolder", _findHistory._isFifInHiddenFolder ? L"yes" : L"no");
(findHistoryRoot->ToElement())->SetAttribute(L"fifProjectPanel1", _findHistory._isFifProjectPanel_1 ? L"yes" : L"no");
(findHistoryRoot->ToElement())->SetAttribute(L"fifProjectPanel2", _findHistory._isFifProjectPanel_2 ? L"yes" : L"no");

View File

@ -53,7 +53,7 @@
class NativeLangSpeaker;
const bool POS_VERTICAL = true;
const bool POS_HORIZOTAL = false;
const bool POS_HORIZONTAL = false;
const int UDD_SHOW = 1; // 0000 0001
const int UDD_DOCKED = 2; // 0000 0010
@ -88,7 +88,7 @@ enum class EolType: std::uint8_t
unix,
// special values
unknown, // can not be the first value for legacy code
unknown, // cannot be the first value for legacy code
osdefault = windows,
};
@ -105,12 +105,12 @@ EolType convertIntToFormatType(int value, EolType defvalue = EolType::osdefault)
enum UniMode {
uni8Bit = 0, // ANSI
uniUTF8 = 1, // UTF-8 with BOM
uni16BE = 2, // UTF-16 Big Ending with BOM
uni16LE = 3, // UTF-16 Little Ending with BOM
uni16BE = 2, // UTF-16 Big Endian with BOM
uni16LE = 3, // UTF-16 Little Endian with BOM
uniCookie = 4, // UTF-8 without BOM
uni7Bit = 5, //
uni16BE_NoBOM = 6, // UTF-16 Big Ending without BOM
uni16LE_NoBOM = 7, // UTF-16 Little Ending without BOM
uni16BE_NoBOM = 6, // UTF-16 Big Endian without BOM
uni16LE_NoBOM = 7, // UTF-16 Little Endian without BOM
uniEnd};
enum ChangeDetect { cdDisabled = 0x0, cdEnabledOld = 0x01, cdEnabledNew = 0x02, cdAutoUpdate = 0x04, cdGo2end = 0x08 };
@ -1266,7 +1266,7 @@ public:
struct FindHistory final
{
enum searchMode{normal, extended, regExpr};
enum transparencyMode{none, onLossingFocus, persistant};
enum transparencyMode{none, onLosingFocus, persistent};
bool _isSearch2ButtonsMode = false;
@ -1286,14 +1286,14 @@ struct FindHistory final
bool _isDirectionDown = true;
bool _dotMatchesNewline = false;
bool _isFifRecuisive = true;
bool _isFifRecursive = true;
bool _isFifInHiddenFolder = false;
bool _isFifProjectPanel_1 = false;
bool _isFifProjectPanel_2 = false;
bool _isFifProjectPanel_3 = false;
searchMode _searchMode = normal;
transparencyMode _transparencyMode = onLossingFocus;
transparencyMode _transparencyMode = onLosingFocus;
int _transparency = 150;
bool _isFilterFollowDoc = false;
@ -1615,7 +1615,7 @@ public:
bool writeColumnEditorSettings() const;
bool writeFileBrowserSettings(const std::vector<std::wstring> & rootPath, const std::wstring & latestSelectedItemPath) const;
TiXmlNode* getChildElementByAttribut(TiXmlNode *pere, const wchar_t *childName, const wchar_t *attributName, const wchar_t *attributVal) const;
TiXmlNode* getChildElementByAttribute(TiXmlNode *pere, const wchar_t *childName, const wchar_t *attributeName, const wchar_t *attributeVal) const;
bool writeScintillaParams();
void createXmlTreeFromGUIParams();
@ -1744,7 +1744,7 @@ public:
const wchar_t * getWorkingDir() const {return _currentDirectory.c_str();};
const wchar_t * getWorkSpaceFilePath(int i) const {
if (i < 0 || i > 2) return nullptr;
return _workSpaceFilePathes[i].c_str();
return _workSpaceFilePaths[i].c_str();
};
const std::vector<std::wstring> getFileBrowserRoots() const { return _fileBrowserRoot; };
@ -1784,7 +1784,7 @@ public:
int langTypeToCommandID(LangType lt) const;
struct FindDlgTabTitiles final {
struct FindDlgTabTitles final {
std::wstring _find;
std::wstring _replace;
std::wstring _findInFiles;
@ -1792,7 +1792,7 @@ public:
std::wstring _mark;
};
FindDlgTabTitiles & getFindDlgTabTitiles() { return _findDlgTabTitiles;};
FindDlgTabTitles & getFindDlgTabTitles() { return _findDlgTabTitles;};
bool asNotepadStyle() const {return _asNotepadStyle;};
@ -1800,8 +1800,8 @@ public:
return getPluginCmdsFromXmlTree();
}
bool getContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU pluginsMenu, bool isEditCM = true);
bool reloadContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU pluginsMenu);
bool getContextMenuFromXmlTree(HMENU mainMenuHandle, HMENU pluginsMenu, bool isEditCM = true);
bool reloadContextMenuFromXmlTree(HMENU mainMenuHandle, HMENU pluginsMenu);
winVer getWinVersion() const {return _winVersion;};
std::wstring getWinVersionStr() const;
std::wstring getWinVerBitStr() const;
@ -1993,7 +1993,7 @@ public:
private:
bool _isAnyShortcutModified = false;
std::vector<CommandShortcut> _shortcuts; //main menu shortuts. Static size
std::vector<CommandShortcut> _shortcuts; //main menu shortcuts. Static size
std::vector<size_t> _customizedShortcuts; //altered main menu shortcuts. Indices static. Needed when saving alterations
std::vector<MacroShortcut> _macros; //macro shortcuts, dynamic size, defined on loading macros and adding/deleting them
std::vector<UserCommand> _userCommands; //run shortcuts, dynamic size, defined on loading run commands and adding/deleting them
@ -2028,7 +2028,7 @@ private:
std::wstring _pluginConfDir; // plugins config dir where the plugin list is installed
std::wstring _userPluginConfDir; // plugins config dir for per user where the plugin parameters are saved / loaded
std::wstring _currentDirectory;
std::wstring _workSpaceFilePathes[3];
std::wstring _workSpaceFilePaths[3];
std::vector<std::wstring> _fileBrowserRoot;
std::wstring _fileBrowserSelectedItemPath;
@ -2036,7 +2036,7 @@ private:
Accelerator* _pAccelerator = nullptr;
ScintillaAccelerator* _pScintAccelerator = nullptr;
FindDlgTabTitiles _findDlgTabTitiles;
FindDlgTabTitles _findDlgTabTitles;
bool _asNotepadStyle = false;
winVer _winVersion = WV_UNKNOWN;
@ -2149,7 +2149,7 @@ private:
void writePrintSetting(TiXmlElement *element);
void initMenuKeys(); //initialise menu keys and scintilla keys. Other keys are initialized on their own
void initScintillaKeys(); //these functions have to be called first before any modifications are loaded
int getCmdIdFromMenuEntryItemName(HMENU mainMenuHadle, const std::wstring& menuEntryName, const std::wstring& menuItemName); // return -1 if not found
int getCmdIdFromMenuEntryItemName(HMENU mainMenuHandle, const std::wstring& menuEntryName, const std::wstring& menuItemName); // return -1 if not found
int getPluginCmdIdFromMenuEntryItemName(HMENU pluginsMenu, const std::wstring& pluginName, const std::wstring& pluginCmdName); // return -1 if not found
winVer getWindowsVersion();
unsigned long _sintillaModEventMask = SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT | SC_PERFORMED_UNDO | SC_PERFORMED_REDO | SC_MOD_CHANGEINDICATOR;

View File

@ -235,7 +235,7 @@ void Buffer::updateTimeStamp()
// Set full path file name in buffer object,
// and determinate its language by its extension.
// and determine its language by its extension.
void Buffer::setFileName(const wchar_t *fn)
{
NppParameters& nppParamInst = NppParameters::getInstance();
@ -251,7 +251,7 @@ void Buffer::setFileName(const wchar_t *fn)
_isFromNetwork = PathIsNetworkPath(fn);
// for _lang
LangType determinatedLang = L_TEXT;
LangType determinedLang = L_TEXT;
wchar_t *ext = PathFindExtension(_fullPathName.c_str());
if (*ext == '.') // extension found
{
@ -261,34 +261,34 @@ void Buffer::setFileName(const wchar_t *fn)
const wchar_t* langName = nppParamInst.getUserDefinedLangNameFromExt(ext, _fileName);
if (langName)
{
determinatedLang = L_USER;
determinedLang = L_USER;
_userLangExt = langName;
}
else // if it's not user lang, then check if it's supported lang
{
_userLangExt.clear();
determinatedLang = nppParamInst.getLangFromExt(ext);
determinedLang = nppParamInst.getLangFromExt(ext);
}
}
if (determinatedLang == L_TEXT) // language can probably be refined
if (determinedLang == L_TEXT) // language can probably be refined
{
if ((wcsicmp(_fileName, L"makefile") == 0) || (wcsicmp(_fileName, L"GNUmakefile") == 0))
determinatedLang = L_MAKEFILE;
determinedLang = L_MAKEFILE;
else if (wcsicmp(_fileName, L"CmakeLists.txt") == 0)
determinatedLang = L_CMAKE;
determinedLang = L_CMAKE;
else if ((wcsicmp(_fileName, L"SConstruct") == 0) || (wcsicmp(_fileName, L"SConscript") == 0) || (wcsicmp(_fileName, L"wscript") == 0))
determinatedLang = L_PYTHON;
determinedLang = L_PYTHON;
else if ((wcsicmp(_fileName, L"Rakefile") == 0) || (wcsicmp(_fileName, L"Vagrantfile") == 0))
determinatedLang = L_RUBY;
determinedLang = L_RUBY;
else if ((wcsicmp(_fileName, L"crontab") == 0) || (wcsicmp(_fileName, L"PKGBUILD") == 0) || (wcsicmp(_fileName, L"APKBUILD") == 0))
determinatedLang = L_BASH;
determinedLang = L_BASH;
}
updateTimeStamp();
BufferStatusInfo lang2Change = BufferChangeNone;
if (!_hasLangBeenSetFromMenu && (determinatedLang != _lang || _lang == L_USER))
if (!_hasLangBeenSetFromMenu && (determinedLang != _lang || _lang == L_USER))
{
if (_isLargeFile)
{
@ -296,7 +296,7 @@ void Buffer::setFileName(const wchar_t *fn)
}
else
{
_lang = determinatedLang;
_lang = determinedLang;
lang2Change = BufferChangeLanguage;
}
}
@ -705,7 +705,7 @@ void FileManager::init(Notepad_plus * pNotepadPlus, ScintillaEditView * pscratch
{
_pNotepadPlus = pNotepadPlus;
_pscratchTilla = pscratchTilla;
_pscratchTilla->execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information
_pscratchTilla->execute(SCI_SETUNDOCOLLECTION, false); //don't store any undo information
_scratchDocDefault = (Document)_pscratchTilla->execute(SCI_GETDOCPOINTER);
_pscratchTilla->execute(SCI_ADDREFDOCUMENT, 0, _scratchDocDefault);
}
@ -1313,7 +1313,7 @@ SavingStatus FileManager::saveBuffer(BufferID id, const wchar_t* filename, bool
freeBytesForUser.QuadPart += fileSize;
}
// determinate if free space is enough
// determine if free space is enough
if (freeBytesForUser.QuadPart < buffer->docLength())
return SavingStatus::NotEnoughRoom;
}
@ -1400,10 +1400,10 @@ SavingStatus FileManager::saveBuffer(BufferID id, const wchar_t* filename, bool
buffer->setFileName(fullpath);
// if not a large file and language is normal text (not defined)
// we may try determinate its language from its content
// we may try determine its language from its content
if (!buffer->isLargeFile() && buffer->_lang == L_TEXT)
{
LangType detectedLang = detectLanguageFromTextBegining((unsigned char*)buf, lengthDoc);
LangType detectedLang = detectLanguageFromTextBeginning((unsigned char*)buf, lengthDoc);
// if a language is detected from the content
if (detectedLang != L_TEXT)
@ -1591,7 +1591,7 @@ int FileManager::detectCodepage(char* buf, size_t len)
return codepage;
}
LangType FileManager::detectLanguageFromTextBegining(const unsigned char *data, size_t dataLen)
LangType FileManager::detectLanguageFromTextBeginning(const unsigned char *data, size_t dataLen)
{
struct FirstLineLanguages
{
@ -1831,7 +1831,7 @@ bool FileManager::loadFileData(Document doc, int64_t fileSize, const wchar_t * f
if (!isLargeFile && fileFormat._language == L_TEXT)
{
// check the language du fichier
fileFormat._language = detectLanguageFromTextBegining((unsigned char *)data, lenFile);
fileFormat._language = detectLanguageFromTextBeginning((unsigned char *)data, lenFile);
}
isFirstTime = false;

View File

@ -137,7 +137,7 @@ private:
int detectCodepage(char* buf, size_t len);
bool loadFileData(Document doc, int64_t fileSize, const wchar_t* filename, char* buffer, Utf8_16_Read* UnicodeConvertor, LoadedFileFormat& fileFormat);
LangType detectLanguageFromTextBegining(const unsigned char *data, size_t dataLen);
LangType detectLanguageFromTextBeginning(const unsigned char *data, size_t dataLen);
Notepad_plus* _pNotepadPlus = nullptr;
ScintillaEditView* _pscratchTilla = nullptr;
@ -162,7 +162,7 @@ public:
Buffer(FileManager * pManager, BufferID id, Document doc, DocFileStatus type, const wchar_t *fileName, bool isLargeFile);
// this method 1. copies the file name
// 2. determinates the language from the ext of file name
// 2. determines the language from the ext of file name
// 3. gets the last modified time
void setFileName(const wchar_t *fn);
@ -425,8 +425,8 @@ private:
bool _isModified = false;
bool _isLoadedDirty = false; // it's the indicator for finding buffer's initial state
bool _isUnsync = false; // Buffer should be always dirty (with any undo/redo operation) if the editing buffer is unsyncronized with file on disk.
// By "unsyncronized" it means :
bool _isUnsync = false; // Buffer should be always dirty (with any undo/redo operation) if the editing buffer is unsynchronized with file on disk.
// By "unsynchronized" it means :
// 1. the file is deleted outside but the buffer in Notepad++ is kept.
// 2. the file is modified by another app but the buffer is not reloaded in Notepad++.
// Note that if the buffer is untitled, there's no correspondent file on the disk so the buffer is considered as independent therefore synchronized.

View File

@ -385,7 +385,7 @@ void FindReplaceDlg::fillFindHistory()
::SendDlgItemMessage(_hSelf, IDC_BACKWARDDIRECTION, BM_SETCHECK, !findHistory._isDirectionDown, 0);
::SendDlgItemMessage(_hSelf, IDD_FINDINFILES_INHIDDENDIR_CHECK, BM_SETCHECK, findHistory._isFifInHiddenFolder, 0);
::SendDlgItemMessage(_hSelf, IDD_FINDINFILES_RECURSIVE_CHECK, BM_SETCHECK, findHistory._isFifRecuisive, 0);
::SendDlgItemMessage(_hSelf, IDD_FINDINFILES_RECURSIVE_CHECK, BM_SETCHECK, findHistory._isFifRecursive, 0);
::SendDlgItemMessage(_hSelf, IDD_FINDINFILES_PROJECT1_CHECK, BM_SETCHECK, findHistory._isFifProjectPanel_1, 0);
::SendDlgItemMessage(_hSelf, IDD_FINDINFILES_PROJECT2_CHECK, BM_SETCHECK, findHistory._isFifProjectPanel_2, 0);
@ -438,7 +438,7 @@ void FindReplaceDlg::fillFindHistory()
::SendDlgItemMessage(_hSelf, IDC_TRANSPARENT_CHECK, BM_SETCHECK, TRUE, 0);
int id;
if (findHistory._transparencyMode == FindHistory::onLossingFocus)
if (findHistory._transparencyMode == FindHistory::onLosingFocus)
{
id = IDC_TRANSPARENT_LOSSFOCUS_RADIO;
}
@ -927,7 +927,7 @@ void Finder::gotoNextFoundResult(int direction)
const SearchResultMarkingLine& markingLine = *(_pMainMarkings->begin() + lno);
//
// Determinate currentPosInLine status among pos_infront, pose_between, pos_inside and pos_behind
// Determine currentPosInLine status among pos_infront, pose_between, pos_inside and pos_behind
//
CurrentPosInLineInfo cpili = getCurrentPosInLineInfo(currentPosInLine, markingLine);
@ -2669,7 +2669,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
if (isChecked)
{
::SendDlgItemMessage(_hSelf, IDC_TRANSPARENT_LOSSFOCUS_RADIO, BM_SETCHECK, BST_CHECKED, 0);
findHistory._transparencyMode = FindHistory::onLossingFocus;
findHistory._transparencyMode = FindHistory::onLosingFocus;
}
else
{
@ -2686,14 +2686,14 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
{
int percent = static_cast<int32_t>(::SendDlgItemMessage(_hSelf, IDC_PERCENTAGE_SLIDER, TBM_GETPOS, 0, 0));
(NppParameters::getInstance()).SetTransparent(_hSelf, percent);
findHistory._transparencyMode = FindHistory::persistant;
findHistory._transparencyMode = FindHistory::persistent;
}
return TRUE;
case IDC_TRANSPARENT_LOSSFOCUS_RADIO :
{
(NppParameters::getInstance()).removeTransparent(_hSelf);
findHistory._transparencyMode = FindHistory::onLossingFocus;
findHistory._transparencyMode = FindHistory::onLosingFocus;
}
return TRUE;
@ -2703,7 +2703,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
case IDD_FINDINFILES_RECURSIVE_CHECK :
{
if (_currentStatus == FINDINFILES_DLG)
findHistory._isFifRecuisive = _options._isRecursive = isCheckedOrNot(IDD_FINDINFILES_RECURSIVE_CHECK);
findHistory._isFifRecursive = _options._isRecursive = isCheckedOrNot(IDD_FINDINFILES_RECURSIVE_CHECK);
}
return TRUE;
@ -2926,7 +2926,7 @@ bool FindReplaceDlg::processFindNext(const wchar_t *txt2find, const FindOption *
if (oFindStatus)
*oFindStatus = FSNotFound;
//failed, or failed twice with wrap
if (pOptions->_incrementalType == NotIncremental) //incremental search doesnt trigger messages
if (pOptions->_incrementalType == NotIncremental) //incremental search doesn't trigger messages
{
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
wstring warningMsg = pNativeSpeaker->getLocalizedStrFromID("find-status-cannot-find", L"Find: Can't find the text \"$STR_REPLACE$\"");
@ -3648,7 +3648,7 @@ void FindReplaceDlg::findAllIn(InWhat op)
data.pszAddInfo = _findAllResultStr;
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -3674,7 +3674,7 @@ void FindReplaceDlg::findAllIn(InWhat op)
_pFinder->_scintView.execute(SCI_SETCODEPAGE, SC_CP_UTF8);
_pFinder->_scintView.execute(SCI_USEPOPUP, SC_POPUP_NEVER);
_pFinder->_scintView.execute(SCI_SETMODEVENTMASK, MODEVENTMASK_OFF); // Turn off the modification event
_pFinder->_scintView.execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information
_pFinder->_scintView.execute(SCI_SETUNDOCOLLECTION, false); //don't store any undo information
_pFinder->_scintView.execute(SCI_SETCARETWIDTH, 1);
_pFinder->_scintView.showMargin(ScintillaEditView::_SC_MARGE_FOLDER, true);
@ -3796,7 +3796,7 @@ Finder* FindReplaceDlg::createFinder()
data.pszAddInfo = _findAllResultStr;
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
data.pszModuleName = NPP_INTERNAL_FUNCTION_STR;
// the dlgDlg should be the index of funcItem where the current function pointer is
// in this case is DOCKABLE_DEMO_INDEX
@ -3823,7 +3823,7 @@ Finder* FindReplaceDlg::createFinder()
pFinder->_scintView.execute(SCI_SETCODEPAGE, SC_CP_UTF8);
pFinder->_scintView.execute(SCI_USEPOPUP, SC_POPUP_NEVER);
pFinder->_scintView.execute(SCI_SETMODEVENTMASK, MODEVENTMASK_OFF); // Turn off the modification event
pFinder->_scintView.execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information
pFinder->_scintView.execute(SCI_SETUNDOCOLLECTION, false); //don't store any undo information
pFinder->_scintView.execute(SCI_SETCARETWIDTH, 1);
pFinder->_scintView.showMargin(ScintillaEditView::_SC_MARGE_FOLDER, true);
@ -6139,7 +6139,7 @@ void FindIncrementDlg::markSelectedTextInc(bool enable, FindOption *opt)
//Get selection
Sci_CharacterRangeFull range = (*(_pFRDlg->_ppEditView))->getSelection();
//If nothing selected, dont mark anything
//If nothing selected, don't mark anything
if (range.cpMin == range.cpMax)
return;

View File

@ -155,7 +155,7 @@ bool FunctionCallTip::getCursorFunction()
std::vector< Token > tokenVector;
int tokenLen = 0;
for (int i = 0; i < offset; ++i) //we dont care about stuff after the offset
for (int i = 0; i < offset; ++i) //we don't care about stuff after the offset
{
//tokenVector.push_back(pair(lineData+i, len));
wchar_t ch = lineData[i];
@ -206,7 +206,7 @@ bool FunctionCallTip::getCursorFunction()
{
++scopeLevel;
newValue = curValue;
valueVec.push_back(newValue); //store the current settings, so when this new function doesnt happen to be the 'real' one, we can restore everything
valueVec.push_back(newValue); //store the current settings, so when this new function doesn't happen to be the 'real' one, we can restore everything
curValue.scopeLevel = scopeLevel;
if (i > 0 && curValue.lastIdentifier == static_cast<int32_t>(i) - 1)
@ -308,7 +308,7 @@ bool FunctionCallTip::loadFunction()
continue;
int compVal = 0;
if (_ignoreCase)
compVal = testNameNoCase(name, _funcName); //lstrcmpi doesnt work in this case
compVal = testNameNoCase(name, _funcName); //lstrcmpi doesn't work in this case
else
compVal = lstrcmp(name, _funcName);
if (!compVal) //found it!

View File

@ -26,7 +26,7 @@ public:
explicit FunctionCallTip(ScintillaEditView * pEditView) : _pEditView(pEditView) {};
~FunctionCallTip() {/* cleanup(); */};
void setLanguageXML(TiXmlElement * pXmlKeyword); //set calltip keyword node
bool updateCalltip(int ch, bool needShown = false); //Ch is character typed, or 0 if another event occured. NeedShown is true if calltip should be attempted to displayed. Return true if calltip was made visible
bool updateCalltip(int ch, bool needShown = false); //Ch is character typed, or 0 if another event occurred. NeedShown is true if calltip should be attempted to displayed. Return true if calltip was made visible
void showNextOverload(); //show next overloaded parameters
void showPrevOverload(); //show prev overloaded parameters
bool isVisible() { return _pEditView?_pEditView->execute(SCI_CALLTIPACTIVE) == TRUE:false; }; //true if calltip visible

View File

@ -2130,7 +2130,7 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
{
const auto currentIndentMode = execute(SCI_GETINDENTATIONGUIDES);
// Python like indentation, excludes lexers (Nim, VB, YAML, etc.)
// that includes tailing empty or whitespace only lines in folding block.
// that includes trailing empty or whitespace only lines in folding block.
const int docIndentMode = isPythonStyleIndentation(typeDoc) ? SC_IV_LOOKFORWARD : SC_IV_LOOKBOTH;
if (currentIndentMode != docIndentMode)
execute(SCI_SETINDENTATIONGUIDES, docIndentMode);
@ -2191,7 +2191,7 @@ void ScintillaEditView::restoreCurrentPosPreStep()
execute(SCI_SETANCHOR, pos._startPos);
execute(SCI_SETCURRENTPOS, pos._endPos);
execute(SCI_CANCEL); //disable
if (!isWrap()) //only offset if not wrapping, otherwise the offset isnt needed at all
if (!isWrap()) //only offset if not wrapping, otherwise the offset isn't needed at all
{
execute(SCI_SETSCROLLWIDTH, pos._scrollWidth);
execute(SCI_SETXOFFSET, pos._xOffset);
@ -4120,7 +4120,7 @@ bool ScintillaEditView::hidelineMarkerClicked(intptr_t lineNumber)
void ScintillaEditView::notifyHidelineMarkers(Buffer * buf, bool isHide, size_t location, bool del)
{
if (buf != _currentBuffer) //if not visible buffer dont do a thing
if (buf != _currentBuffer) //if not visible buffer, don't do anything
return;
if (isHide)
@ -4250,7 +4250,7 @@ void ScintillaEditView::showHiddenLines(size_t searchStart, bool toEndOfDoc, boo
auto levelLine = execute(SCI_GETFOLDLEVEL, i, 0);
if (levelLine & SC_FOLDLEVELHEADERFLAG)
{ //fold section. Dont show lines if fold is closed
{ //fold section. Don't show lines if fold is closed
if (isInSection && !isFolded(i))
{
execute(SCI_SHOWLINES, startShowing, i);

View File

@ -313,7 +313,7 @@ T* variedFormatNumber2String(T* str, size_t strLen, size_t number, size_t base,
T noUsedSymbol = ' ';
//
// Determinate leading zero/space or none
// Determine leading zero/space or none
//
if (lead == ColumnEditorParam::spaceLeading)
{

View File

@ -160,7 +160,7 @@ void TiXmlStringA::append( const char* str, int len )
// strcpy (new_string, cstring);
memcpy (new_string, cstring, length ());
// append the suffix. It does exist, otherwize we wouldn't be expanding
// append the suffix. It does exist, otherwise we wouldn't be expanding
// strncat (new_string, str, len);
memcpy (new_string + length (),
str,
@ -209,7 +209,7 @@ void TiXmlStringA::append( const char * suffix )
memcpy (new_string, cstring, 1 + length ());
// strcpy (new_string, cstring);
// append the suffix. It does exist, otherwize we wouldn't be expanding
// append the suffix. It does exist, otherwise we wouldn't be expanding
memcpy (new_string + length (),
suffix,
strlen (suffix) + 1);

View File

@ -152,7 +152,7 @@ void TiXmlString::append( const wchar_t* str, int len )
if (allocated && cstring)
memcpy (new_string, cstring, length ());
// append the suffix. It does exist, otherwize we wouldn't be expanding
// append the suffix. It does exist, otherwise we wouldn't be expanding
// strncat (new_string, str, len);
memcpy (new_string + length (),
str,
@ -200,7 +200,7 @@ void TiXmlString::append( const wchar_t * suffix )
if (allocated && cstring)
memcpy (new_string, cstring, 1 + length ());
// append the suffix. It does exist, otherwize we wouldn't be expanding
// append the suffix. It does exist, otherwise we wouldn't be expanding
memcpy (new_string + length (),
suffix,
lstrlen (suffix) + 1);

View File

@ -55,7 +55,7 @@ struct tTbData {
// user modifications
UINT uMask = 0; // mask params: look to above defines
HICON hIconTab = nullptr; // icon for tabs
const wchar_t* pszAddInfo = nullptr; // for plugin to display additional informations
const wchar_t* pszAddInfo = nullptr; // for plugin to display additional information
// internal data, do not use !!!
RECT rcFloat = {}; // floating position

View File

@ -243,7 +243,7 @@ void Gripper::create()
// calculate the mouse pt within dialog
::GetCursorPos(&pt);
// get tab informations
// get tab information
initTabInformation();
if (_pCont->isFloating() == true)

View File

@ -115,7 +115,7 @@ size_t FunctionListPanel::getBodyClosePos(size_t begin, const wchar_t *bodyOpenS
{
targetEnd = (*_ppEditView)->execute(SCI_GETTARGETEND);
// Now we determinate the symbol (open or close)
// Now we determine the symbol (open or close)
intptr_t tmpStart = (*_ppEditView)->searchInTarget(bodyOpenSymbol, lstrlen(bodyOpenSymbol), targetStart, targetEnd);
if (tmpStart >= 0) // open symbol found
{
@ -441,7 +441,7 @@ void FunctionListPanel::initPreferencesMenu()
NativeLangSpeaker* pNativeSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
const NppGUI& nppGUI = NppParameters::getInstance().getNppGUI();
wstring shouldSortFunctionListStr = pNativeSpeaker->getAttrNameStr(L"Sort functions (A to Z) by default", FL_FUCTIONLISTROOTNODE, FL_PREFERENCE_INITIALSORT);
wstring shouldSortFunctionListStr = pNativeSpeaker->getAttrNameStr(L"Sort functions (A to Z) by default", FL_FUNCTIONLISTROOTNODE, FL_PREFERENCE_INITIALSORT);
_hPreferencesMenu = ::CreatePopupMenu();
::InsertMenu(_hPreferencesMenu, 0, MF_BYCOMMAND, FL_PREFERENCES_INITIALSORT_ID, shouldSortFunctionListStr.c_str());
@ -921,9 +921,9 @@ intptr_t CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LP
// tips text for toolbar buttons
NativeLangSpeaker *pNativeSpeaker = nppParam.getNativeLangSpeaker();
_sortTipStr = pNativeSpeaker->getAttrNameStr(_sortTipStr.c_str(), FL_FUCTIONLISTROOTNODE, FL_SORTLOCALNODENAME);
_reloadTipStr = pNativeSpeaker->getAttrNameStr(_reloadTipStr.c_str(), FL_FUCTIONLISTROOTNODE, FL_RELOADLOCALNODENAME);
_preferenceTipStr = pNativeSpeaker->getAttrNameStr(_preferenceTipStr.c_str(), FL_FUCTIONLISTROOTNODE, FL_PREFERENCESLOCALNODENAME);
_sortTipStr = pNativeSpeaker->getAttrNameStr(_sortTipStr.c_str(), FL_FUNCTIONLISTROOTNODE, FL_SORTLOCALNODENAME);
_reloadTipStr = pNativeSpeaker->getAttrNameStr(_reloadTipStr.c_str(), FL_FUNCTIONLISTROOTNODE, FL_RELOADLOCALNODENAME);
_preferenceTipStr = pNativeSpeaker->getAttrNameStr(_preferenceTipStr.c_str(), FL_FUNCTIONLISTROOTNODE, FL_PREFERENCESLOCALNODENAME);
_hSearchEdit = CreateWindowEx(WS_EX_CLIENTEDGE, WC_EDIT, NULL,
WS_CHILD | WS_VISIBLE | ES_AUTOVSCROLL,

View File

@ -22,7 +22,7 @@
#include "TreeView.h"
#define FL_PANELTITLE L"Function List"
#define FL_FUCTIONLISTROOTNODE "FunctionList"
#define FL_FUNCTIONLISTROOTNODE "FunctionList"
#define FL_SORTLOCALNODENAME "SortTip"
#define FL_RELOADLOCALNODENAME "ReloadTip"

View File

@ -539,7 +539,7 @@ size_t FunctionZoneParser::getBodyClosePos(size_t begin, const wchar_t *bodyOpen
// Treat it only if it's NOT in the comment zone
if (!isInZones(targetStart, commentZones))
{
// Now we determinate the symbol (open or close)
// Now we determine the symbol (open or close)
intptr_t tmpStart = (*ppEditView)->searchInTarget(bodyOpenSymbol, lstrlen(bodyOpenSymbol), targetStart, targetEnd);
if (tmpStart >= 0) // open symbol found
{

View File

@ -888,7 +888,7 @@ intptr_t CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARA
shortcut._isShift = FALSE;
shortcut._key = '\0';
::SendMessage(_hParent, NPPM_INTERNAL_PLUGINSHORTCUTMOTIFIED, cmdID, reinterpret_cast<LPARAM>(&shortcut));
::SendMessage(_hParent, NPPM_INTERNAL_PLUGINSHORTCUTMODIFIED, cmdID, reinterpret_cast<LPARAM>(&shortcut));
nppParam.setShortcutDirty();
}
break;
@ -1025,7 +1025,7 @@ intptr_t CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARA
shortcut._isShift = pcsc.getKeyCombo()._isShift;
shortcut._key = pcsc.getKeyCombo()._key;
::SendMessage(_hParent, NPPM_INTERNAL_PLUGINSHORTCUTMOTIFIED, cmdID, reinterpret_cast<LPARAM>(&shortcut));
::SendMessage(_hParent, NPPM_INTERNAL_PLUGINSHORTCUTMODIFIED, cmdID, reinterpret_cast<LPARAM>(&shortcut));
nppParam.setShortcutDirty();
}
}
@ -1122,7 +1122,7 @@ intptr_t CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARA
ms.setID(ms.getID() - 1); //shift all IDs
theMacros[i] = ms;
// Ajust menu items
// Adjust menu items
MenuItemUnit& miu = macroMenu.getItemFromIndex(i);
miu._cmdID -= 1; //shift all IDs
}
@ -1178,7 +1178,7 @@ intptr_t CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARA
uc.setID(uc.getID() - 1); //shift all IDs
theUserCmds[i] = uc;
// Ajust menu items
// Adjust menu items
MenuItemUnit& miu = runMenu.getItemFromIndex(i);
miu._cmdID -= 1; //shift all IDs
}

View File

@ -89,7 +89,7 @@ bool PluginsAdminDlg::isFoundInListFromIndex(const PluginViewList& inWhichList,
long PluginsAdminDlg::searchFromCurrentSel(const PluginViewList& inWhichList, const wstring& str2search, bool inWhichPart, bool isNextMode) const
{
// search from curent selected item or from the beginning
// search from current selected item or from the beginning
long currentIndex = inWhichList.getSelectedIndex();
int nbItem = static_cast<int>(inWhichList.nbItem());
if (currentIndex == -1)
@ -110,7 +110,7 @@ long PluginsAdminDlg::searchFromCurrentSel(const PluginViewList& inWhichList, co
return i;
}
// from to begining to current position
// from to beginning to current position
for (int i = 0; i < currentIndex + (isNextMode ? 1 : 0); ++i)
{
if (isFoundInListFromIndex(inWhichList, i, str2search, inWhichPart))
@ -1079,7 +1079,7 @@ void PluginsAdminDlg::switchDialog(int indexToSwitch)
}
break;
case 3: // incompability plugins
case 3: // incompatible plugins
{
showAvailable = false;
showUpdate = false;

View File

@ -73,7 +73,7 @@ struct NppCurrentStatus
std::wstring _nppInstallPath;
std::wstring _appdataPath;
// it should determinate :
// it should determine :
// 1. deployment location : %ProgramFile% %appdata% %other%
// 2. gitup launch mode: ADM ADM NOMAL
bool shouldLaunchInAdmMode() { return _isInProgramFiles; };

View File

@ -713,7 +713,7 @@ intptr_t CALLBACK GeneralSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
NativeLangSpeaker* pNativeSpeaker = nppParam.getNativeLangSpeaker();
pNativeSpeaker->messageBox("Need2Restart2ShowMenuShortcuts",
_hSelf,
L"Notepad++ needs to be restarted to show right menu shorcuts.",
L"Notepad++ needs to be restarted to show right menu shortcuts.",
L"Notepad++ need to be restarted",
MB_OK | MB_APPLMODAL);
@ -1355,7 +1355,7 @@ intptr_t CALLBACK TabbarSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
else
nppGUI._tabStatus &= ~TAB_DRAWINACTIVETAB;
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_DRAWINACIVETAB, 0, 0);
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_DRAWINACTIVETAB, 0, 0);
return TRUE;
}
@ -2881,10 +2881,10 @@ intptr_t CALLBACK MarginsBorderEdgeSubDlg::run_dlgProc(UINT message, WPARAM wPar
case IDC_CHECK_CHANGHISTORYMARGIN:
{
bool isMaginJustEnabled = isCheckedOrNot(IDC_CHECK_CHANGHISTORYMARGIN);
bool isMarginJustEnabled = isCheckedOrNot(IDC_CHECK_CHANGHISTORYMARGIN);
bool isIndicatorAlreadyEnabled = isCheckedOrNot(IDC_CHECK_CHANGHISTORYINDICATOR);
if (isMaginJustEnabled && !isIndicatorAlreadyEnabled) // In the case that both "in margin" & "in text" were disabled, but "in margin" is just enabled
if (isMarginJustEnabled && !isIndicatorAlreadyEnabled) // In the case that both "in margin" & "in text" were disabled, but "in margin" is just enabled
{
if (!changeHistoryWarningHasBeenGiven)
{
@ -2902,9 +2902,9 @@ intptr_t CALLBACK MarginsBorderEdgeSubDlg::run_dlgProc(UINT message, WPARAM wPar
}
else // otherwise
{
svp._isChangeHistoryMarginEnabled = isMaginJustEnabled;
svp._isChangeHistoryEnabled4NextSession = (!isMaginJustEnabled && !isIndicatorAlreadyEnabled) ? changeHistoryState::disable :
(isMaginJustEnabled && isIndicatorAlreadyEnabled) ? changeHistoryState::marginIndicator :changeHistoryState::indicator;
svp._isChangeHistoryMarginEnabled = isMarginJustEnabled;
svp._isChangeHistoryEnabled4NextSession = (!isMarginJustEnabled && !isIndicatorAlreadyEnabled) ? changeHistoryState::disable :
(isMarginJustEnabled && isIndicatorAlreadyEnabled) ? changeHistoryState::marginIndicator :changeHistoryState::indicator;
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_ENABLECHANGEHISTORY, 0, 0);
}
@ -2914,9 +2914,9 @@ intptr_t CALLBACK MarginsBorderEdgeSubDlg::run_dlgProc(UINT message, WPARAM wPar
case IDC_CHECK_CHANGHISTORYINDICATOR:
{
bool isIndicatorJustEnabled = isCheckedOrNot(IDC_CHECK_CHANGHISTORYINDICATOR);
bool isMaginAlreadyEnabled = isCheckedOrNot(IDC_CHECK_CHANGHISTORYMARGIN);
bool isMarginAlreadyEnabled = isCheckedOrNot(IDC_CHECK_CHANGHISTORYMARGIN);
if (isIndicatorJustEnabled && !isMaginAlreadyEnabled) // In the case that both "in margin" & "in text" were disabled, but "in text" is just enabled
if (isIndicatorJustEnabled && !isMarginAlreadyEnabled) // In the case that both "in margin" & "in text" were disabled, but "in text" is just enabled
{
if (!changeHistoryWarningHasBeenGiven)
{
@ -2935,8 +2935,8 @@ intptr_t CALLBACK MarginsBorderEdgeSubDlg::run_dlgProc(UINT message, WPARAM wPar
else
{
svp._isChangeHistoryIndicatorEnabled = isIndicatorJustEnabled;
svp._isChangeHistoryEnabled4NextSession = (!isIndicatorJustEnabled && !isMaginAlreadyEnabled) ? changeHistoryState::disable :
(isIndicatorJustEnabled && isMaginAlreadyEnabled) ? changeHistoryState::marginIndicator : changeHistoryState::margin;
svp._isChangeHistoryEnabled4NextSession = (!isIndicatorJustEnabled && !isMarginAlreadyEnabled) ? changeHistoryState::disable :
(isIndicatorJustEnabled && isMarginAlreadyEnabled) ? changeHistoryState::marginIndicator : changeHistoryState::margin;
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_ENABLECHANGEHISTORY, 0, 0);
}

View File

@ -1208,7 +1208,7 @@ bool ProjectPanel::saveWorkSpaceAs(bool saveCopyAs)
{
CustomFileDialog fDlg(_hSelf);
setFileExtFilter(fDlg);
fDlg.setExtIndex(0); // 0 index for "custom extention" type if any else for "All types *.*"
fDlg.setExtIndex(0); // 0 index for "custom extension" type if any else for "All types *.*"
fDlg.setFolder(getWorkSpaceFilePath());
const wstring fn = fDlg.doSaveDlg();

View File

@ -198,7 +198,7 @@ void Splitter::destroy()
int Splitter::getClickZone(WH which)
{
// determinated by (_dwFlags & SV_VERTICAL) && _splitterSize
// determined by (_dwFlags & SV_VERTICAL) && _splitterSize
if (_splitterSize <= 8)
{
return isVertical()

View File

@ -204,7 +204,7 @@ void TabBar::setImageList(HIMAGELIST himl)
}
void TabBar::reSizeTo(RECT & rc2Ajust)
void TabBar::reSizeTo(RECT & rc2Adjust)
{
RECT rowRect{};
int rowCount = 0, tabsHight = 0;
@ -212,8 +212,8 @@ void TabBar::reSizeTo(RECT & rc2Ajust)
// Important to do that!
// Otherwise, the window(s) it contains will take all the resouce of CPU
// We don't need to resize the contained windows if they are even invisible anyway
display(rc2Ajust.right > 10);
RECT rc = rc2Ajust;
display(rc2Adjust.right > 10);
RECT rc = rc2Adjust;
Window::reSizeTo(rc);
// Do our own calculations because TabCtrl_AdjustRect doesn't work
@ -245,13 +245,13 @@ void TabBar::reSizeTo(RECT & rc2Ajust)
if (isVertical)
{
rc2Ajust.left += tabsHight;
rc2Ajust.right -= tabsHight;
rc2Adjust.left += tabsHight;
rc2Adjust.right -= tabsHight;
}
else
{
rc2Ajust.top += tabsHight;
rc2Ajust.bottom -= tabsHight;
rc2Adjust.top += tabsHight;
rc2Adjust.bottom -= tabsHight;
}
}

View File

@ -85,7 +85,7 @@ public:
virtual ~TabBar() = default;
void destroy() override;
virtual void init(HINSTANCE hInst, HWND hwnd, bool isVertical = false, bool isMultiLine = false);
void reSizeTo(RECT& rc2Ajust) override;
void reSizeTo(RECT& rc2Adjust) override;
int insertAtEnd(const wchar_t *subTabName);
void activateAt(int index) const;
void getCurrentTitle(wchar_t *title, int titleLen);

View File

@ -565,7 +565,7 @@ void ToolBar::registerDynBtnDM(UINT messageID, toolbarIconsWithDarkMode* iconHan
}
}
void ToolBar::doPopop(POINT chevPoint)
void ToolBar::doPopup(POINT chevPoint)
{
//first find hidden buttons
int width = Window::getWidth();

View File

@ -105,7 +105,7 @@ public :
void registerDynBtn(UINT message, toolbarIcons* iconHandles, HICON absentIco);
void registerDynBtnDM(UINT message, toolbarIconsWithDarkMode* iconHandles);
void doPopop(POINT chevPoint); //show the popup if buttons are hidden
void doPopup(POINT chevPoint); //show the popup if buttons are hidden
void addToRebar(ReBar * rebar);

View File

@ -102,7 +102,7 @@ KeyIDNAME namedKeyArray[] = {
{"Numpad 9", VK_NUMPAD9},
{"Num *", VK_MULTIPLY},
{"Num +", VK_ADD},
// {"Num Enter"), VK_SEPARATOR}, //this one doesnt seem to work: see below
// {"Num Enter"), VK_SEPARATOR}, //this one doesn't seem to work: see below
{"Num -", VK_SUBTRACT},
{"Num .", VK_DECIMAL},
{"Num /", VK_DIVIDE},
@ -1142,7 +1142,7 @@ void ScintillaAccelerator::updateKeys()
{
updateMenuItemByID(skm, skm.getMenuCmdID());
}
if (j == 0) //j is unsigned, so default method doesnt work
if (j == 0) //j is unsigned, so default method doesn't work
break;
}
}

View File

@ -908,32 +908,32 @@ void NativeLangSpeaker::changeFindReplaceDlgLang(FindReplaceDlg & findReplaceDlg
if (titre1 && titre1[0])
{
basic_string<wchar_t> nameW = wmc.char2wchar(titre1, _nativeLangEncoding);
nppParam.getFindDlgTabTitiles()._find = nameW;
findReplaceDlg.changeTabName(FIND_DLG, nppParam.getFindDlgTabTitiles()._find.c_str());
nppParam.getFindDlgTabTitles()._find = nameW;
findReplaceDlg.changeTabName(FIND_DLG, nppParam.getFindDlgTabTitles()._find.c_str());
}
if (titre2 && titre2[0])
{
basic_string<wchar_t> nameW = wmc.char2wchar(titre2, _nativeLangEncoding);
nppParam.getFindDlgTabTitiles()._replace = nameW;
findReplaceDlg.changeTabName(REPLACE_DLG, nppParam.getFindDlgTabTitiles()._replace.c_str());
nppParam.getFindDlgTabTitles()._replace = nameW;
findReplaceDlg.changeTabName(REPLACE_DLG, nppParam.getFindDlgTabTitles()._replace.c_str());
}
if (titre3 && titre3[0])
{
basic_string<wchar_t> nameW = wmc.char2wchar(titre3, _nativeLangEncoding);
nppParam.getFindDlgTabTitiles()._findInFiles = nameW;
findReplaceDlg.changeTabName(FINDINFILES_DLG, nppParam.getFindDlgTabTitiles()._findInFiles.c_str());
nppParam.getFindDlgTabTitles()._findInFiles = nameW;
findReplaceDlg.changeTabName(FINDINFILES_DLG, nppParam.getFindDlgTabTitles()._findInFiles.c_str());
}
if (titre4 && titre4[0])
{
basic_string<wchar_t> nameW = wmc.char2wchar(titre4, _nativeLangEncoding);
nppParam.getFindDlgTabTitiles()._findInProjects = nameW;
findReplaceDlg.changeTabName(FINDINPROJECTS_DLG, nppParam.getFindDlgTabTitiles()._findInProjects.c_str());
nppParam.getFindDlgTabTitles()._findInProjects = nameW;
findReplaceDlg.changeTabName(FINDINPROJECTS_DLG, nppParam.getFindDlgTabTitles()._findInProjects.c_str());
}
if (titre5 && titre5[0])
{
basic_string<wchar_t> nameW = wmc.char2wchar(titre5, _nativeLangEncoding);
nppParam.getFindDlgTabTitiles()._mark = nameW;
findReplaceDlg.changeTabName(MARK_DLG, nppParam.getFindDlgTabTitiles()._mark.c_str());
nppParam.getFindDlgTabTitles()._mark = nameW;
findReplaceDlg.changeTabName(MARK_DLG, nppParam.getFindDlgTabTitles()._mark.c_str());
}
}
}
@ -1007,7 +1007,7 @@ void NativeLangSpeaker::changePluginsAdminDlgLang(PluginsAdminDlg & pluginsAdmin
}
}
void NativeLangSpeaker::changePrefereceDlgLang(PreferenceDlg & preference)
void NativeLangSpeaker::changePreferenceDlgLang(PreferenceDlg & preference)
{
auto currentSel = preference.getListSelectedIndex();
changeDlgLang(preference.getHSelf(), "Preference");

View File

@ -57,7 +57,7 @@ public:
void changeUserDefineLang(UserDefineDialog *userDefineDlg);
void changeUserDefineLangPopupDlg(HWND hDlg);
void changeFindReplaceDlgLang(FindReplaceDlg & findReplaceDlg);
void changePrefereceDlgLang(PreferenceDlg & preference);
void changePreferenceDlgLang(PreferenceDlg & preference);
void changePluginsAdminDlgLang(PluginsAdminDlg & pluginsAdminDlg);
bool getDoSaveOrNotStrings(std::wstring& title, std::wstring& msg);

View File

@ -43,7 +43,7 @@
#define IDM_FILE_OPEN_FOLDER (IDM_FILE + 19)
#define IDM_FILE_OPEN_CMD (IDM_FILE + 20)
#define IDM_FILE_RESTORELASTCLOSEDFILE (IDM_FILE + 21)
#define IDM_FILE_OPENFOLDERASWORSPACE (IDM_FILE + 22)
#define IDM_FILE_OPENFOLDERASWORKSPACE (IDM_FILE + 22)
#define IDM_FILE_OPEN_DEFAULT_VIEWER (IDM_FILE + 23)
#define IDM_FILE_CLOSEALL_UNCHANGED (IDM_FILE + 24)
#define IDM_FILE_CONTAININGFOLDERASWORKSPACE (IDM_FILE + 25)
@ -283,17 +283,17 @@
//#define IDM_VIEW_REDUCETABBAR (IDM_VIEW + 5)
//#define IDM_VIEW_LOCKTABBAR (IDM_VIEW + 6)
//#define IDM_VIEW_DRAWTABBAR_TOPBAR (IDM_VIEW + 7)
//#define IDM_VIEW_DRAWTABBAR_INACIVETAB (IDM_VIEW + 8)
//#define IDM_VIEW_DRAWTABBAR_INACTIVETAB (IDM_VIEW + 8)
#define IDM_VIEW_POSTIT (IDM_VIEW + 9)
#define IDM_VIEW_FOLDALL (IDM_VIEW + 10)
#define IDM_VIEW_DISTRACTIONFREE (IDM_VIEW + 11)
//#define IDM_VIEW_LINENUMBER (IDM_VIEW + 12)
//#define IDM_VIEW_SYMBOLMARGIN (IDM_VIEW + 13)
//#define IDM_VIEW_FOLDERMAGIN (IDM_VIEW + 14)
//#define IDM_VIEW_FOLDERMAGIN_SIMPLE (IDM_VIEW + 15)
//#define IDM_VIEW_FOLDERMAGIN_ARROW (IDM_VIEW + 16)
//#define IDM_VIEW_FOLDERMAGIN_CIRCLE (IDM_VIEW + 17)
//#define IDM_VIEW_FOLDERMAGIN_BOX (IDM_VIEW + 18)
//#define IDM_VIEW_FOLDERMARGIN (IDM_VIEW + 14)
//#define IDM_VIEW_FOLDERMARGIN_SIMPLE (IDM_VIEW + 15)
//#define IDM_VIEW_FOLDERMARGIN_ARROW (IDM_VIEW + 16)
//#define IDM_VIEW_FOLDERMARGIN_CIRCLE (IDM_VIEW + 17)
//#define IDM_VIEW_FOLDERMARGIN_BOX (IDM_VIEW + 18)
#define IDM_VIEW_ALL_CHARACTERS (IDM_VIEW + 19)
#define IDM_VIEW_INDENT_GUIDE (IDM_VIEW + 20)
//#define IDM_VIEW_CURLINE_HILITING (IDM_VIEW + 21)
@ -571,7 +571,7 @@
#define IDM_LANG_EXTERNAL_LIMIT (IDM_LANG + 179)
#define IDM_LANG_USER (IDM_LANG + 180) //46180: Used for translation
#define IDM_LANG_USER_LIMIT (IDM_LANG + 210) //46210: Ajust with IDM_LANG_USER
#define IDM_LANG_USER_LIMIT (IDM_LANG + 210) //46210: Adjust with IDM_LANG_USER
#define IDM_LANG_USER_DLG (IDM_LANG + 250) //46250: Used for translation
#define IDM_LANG_OPENUDLDIR (IDM_LANG + 300)
#define IDM_LANG_UDLCOLLECTION_PROJECT_SITE (IDM_LANG + 301)
@ -595,7 +595,7 @@
#define IDM_SETTING (IDM + 8000)
// #define IDM_SETTING_TAB_SIZE (IDM_SETTING + 1)
// #define IDM_SETTING_TAB_REPLCESPACE (IDM_SETTING + 2)
// #define IDM_SETTING_TAB_REPLACESPACE (IDM_SETTING + 2)
// #define IDM_SETTING_HISTORY_SIZE (IDM_SETTING + 3)
// #define IDM_SETTING_EDGE_SIZE (IDM_SETTING + 4)
#define IDM_SETTING_IMPORTPLUGIN (IDM_SETTING + 5)

View File

@ -664,7 +664,7 @@
#define NPPM_INTERNAL_UPDATETITLEBAR (NOTEPADPLUS_USER_INTERNAL + 23)
#define NPPM_INTERNAL_CANCEL_FIND_IN_FILES (NOTEPADPLUS_USER_INTERNAL + 24)
#define NPPM_INTERNAL_RELOADNATIVELANG (NOTEPADPLUS_USER_INTERNAL + 25)
#define NPPM_INTERNAL_PLUGINSHORTCUTMOTIFIED (NOTEPADPLUS_USER_INTERNAL + 26)
#define NPPM_INTERNAL_PLUGINSHORTCUTMODIFIED (NOTEPADPLUS_USER_INTERNAL + 26)
#define NPPM_INTERNAL_SCINTILLAFINDERCLEARALL (NOTEPADPLUS_USER_INTERNAL + 27)
#define NPPM_INTERNAL_CHANGETABBARICONSET (NOTEPADPLUS_USER_INTERNAL + 28)
#define NPPM_INTERNAL_SET_TAB_SETTINGS (NOTEPADPLUS_USER_INTERNAL + 29)
@ -723,7 +723,7 @@
#define NPPM_INTERNAL_REFRESHTABBAR (NOTEPADPLUS_USER_INTERNAL + 82)
#define NPPM_INTERNAL_REDUCETABBAR (NOTEPADPLUS_USER_INTERNAL + 83)
#define NPPM_INTERNAL_CHANGESELECTTEXTFORGROUND (NOTEPADPLUS_USER_INTERNAL + 84)
#define NPPM_INTERNAL_DRAWINACIVETAB (NOTEPADPLUS_USER_INTERNAL + 85)
#define NPPM_INTERNAL_DRAWINACTIVETAB (NOTEPADPLUS_USER_INTERNAL + 85)
#define NPPM_INTERNAL_DRAWTABTOPBAR (NOTEPADPLUS_USER_INTERNAL + 86)
//#define NPPM_INTERNAL_TABDBCLK2CLOSE (NOTEPADPLUS_USER_INTERNAL + 87)
#define NPPM_INTERNAL_VERTICALTABBAR (NOTEPADPLUS_USER_INTERNAL + 88)

View File

@ -75,9 +75,9 @@ void allowPrivilegeMessages(const Notepad_plus_Window& notepad_plus_plus, winVer
}
}
// parseCommandLine() takes command line arguments part string, cuts arguments by using white space as separater.
// parseCommandLine() takes command line arguments part string, cuts arguments by using white space as separator.
// Only white space in double quotes will be kept, such as file path argument or '-settingsDir=' argument (ex.: -settingsDir="c:\my settings\my folder\")
// if '-z' is present, the 3rd argument after -z wont be cut - ie. all the space will also be kept
// if '-z' is present, the 3rd argument after -z won't be cut - ie. all the space will also be kept
// ex.: '-notepadStyleCmdline -z "C:\WINDOWS\system32\NOTEPAD.EXE" C:\my folder\my file with whitespace.txt' will be separated to:
// 1. "-notepadStyleCmdline"
// 2. "-z"
@ -134,7 +134,7 @@ void parseCommandLine(const wchar_t* commandLine, ParamVector& paramVector)
else //if (isBetweenFileNameQuotes)
{
isBetweenFileNameQuotes = false;
//because we dont want to leave in any quotes in the filename, remove them now (with zero terminator)
//because we don't want to leave in any quotes in the filename, remove them now (with zero terminator)
cmdLinePtr[i] = 0;
}
isInWhiteSpace = false;
@ -335,8 +335,8 @@ const wchar_t FLAG_MONITOR_FILES[] = L"-monitor";
void doException(Notepad_plus_Window & notepad_plus_plus)
{
Win32Exception::removeHandler(); //disable exception handler after excpetion, we dont want corrupt data structurs to crash the exception handler
::MessageBox(Notepad_plus_Window::gNppHWND, L"Notepad++ will attempt to save any unsaved data. However, dataloss is very likely.", L"Recovery initiating", MB_OK | MB_ICONINFORMATION);
Win32Exception::removeHandler(); //disable exception handler after exception, we don't want corrupt data structures to crash the exception handler
::MessageBox(Notepad_plus_Window::gNppHWND, L"Notepad++ will attempt to save any unsaved data. However, data loss is very likely.", L"Recovery initiating", MB_OK | MB_ICONINFORMATION);
wchar_t tmpDir[1024];
GetTempPath(1024, tmpDir);
@ -351,7 +351,7 @@ void doException(Notepad_plus_Window & notepad_plus_plus)
::MessageBox(Notepad_plus_Window::gNppHWND, displayText.c_str(), L"Recovery success", MB_OK | MB_ICONINFORMATION);
}
else
::MessageBox(Notepad_plus_Window::gNppHWND, L"Unfortunatly, Notepad++ was not able to save your work. We are sorry for any lost data.", L"Recovery failure", MB_OK | MB_ICONERROR);
::MessageBox(Notepad_plus_Window::gNppHWND, L"Unfortunately, Notepad++ was not able to save your work. We are sorry for any lost data.", L"Recovery failure", MB_OK | MB_ICONERROR);
}
// Looks for -z arguments and strips command line arguments following those, if any
@ -508,7 +508,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance
bool doUpdateNpp = nppGui._autoUpdateOpt._doAutoUpdate;
bool doUpdatePluginList = nppGui._autoUpdateOpt._doAutoUpdate;
if (doFunctionListExport || doPrintAndQuit) // export functionlist feature will serialize fuctionlist on the disk, then exit Notepad++. So it's important to not launch into existing instance, and keep it silent.
if (doFunctionListExport || doPrintAndQuit) // export functionlist feature will serialize functionlist on the disk, then exit Notepad++. So it's important to not launch into existing instance, and keep it silent.
{
isMultiInst = true;
doUpdateNpp = doUpdatePluginList = false;
@ -526,7 +526,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance
cmdLineParams._isNoSession = true;
}
// override the settings if multiInst is choosen by user in the preference dialog
// override the settings if multiInst is chosen by user in the preference dialog
const NppGUI & nppGUI = nppParameters.getNppGUI();
if (nppGUI._multiInstSetting == multiInst)
{
@ -545,7 +545,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance
const wchar_t * currentFile = params.at(i).c_str();
if (currentFile[0])
{
//check if relative or full path. Relative paths dont have a colon for driveletter
//check if relative or full path. Relative paths don't have a colon for driveletter
quotFileName += L"\"";
quotFileName += relativeFilePathToFullFilePath(currentFile);
@ -641,7 +641,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance
// Due to the code signing problem, the Plugin List cannot be updated independently of Notepad++ for now.
}
// wingup doesn't work with the obsolet security layer (API) under xp since downloadings are secured with SSL on notepad_plus_plus.org
// wingup doesn't work with the obsolete security layer (API) under xp since downloads are secured with SSL on notepad_plus_plus.org
winVer ver = nppParameters.getWinVersion();
bool isGtXP = ver > WV_XP;
@ -690,7 +690,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance
upPlParams += L" -upZip";
// overrided "InfoUrl" in gup.xml
// override "InfoUrl" in gup.xml
upPlParams += L" https://notepad-plus-plus.org/update/pluginListDownloadUrl.php";
// indicate the pluginList installation location
@ -747,7 +747,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance
catch (const Win32Exception & ex)
{
wchar_t message[1024];
wsprintf(message, L"An exception occured. Notepad++ cannot recover and must be shut down.\r\nThe exception details are as follows:\r\n"
wsprintf(message, L"An exception occurred. Notepad++ cannot recover and must be shut down.\r\nThe exception details are as follows:\r\n"
L"Code:\t0x%08X\r\nType:\t%S\r\nException address: 0x%p", ex.code(), ex.what(), ex.where());
::MessageBox(Notepad_plus_Window::gNppHWND, message, L"Win32Exception", MB_OK | MB_ICONERROR);
mdump.writeDump(ex.info());
@ -758,7 +758,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance
::MessageBoxA(Notepad_plus_Window::gNppHWND, ex.what(), "General Exception", MB_OK);
doException(notepad_plus_plus);
}
catch (...) // this shouldnt ever have to happen
catch (...) // this shouldn't ever have to happen
{
::MessageBoxA(Notepad_plus_Window::gNppHWND, "An exception that we did not yet found its name is just caught", "Unknown Exception", MB_OK);
doException(notepad_plus_plus);

View File

@ -342,7 +342,7 @@ void Window::SetPositionRelative(PRectangle rc, const Window *relativeTo) {
const RECT rcMonitor = RectFromPRectangle(rc);
HMONITOR hMonitor = MonitorFromRect(&rcMonitor, MONITOR_DEFAULTTONEAREST);
// If hMonitor is NULL, that's just the main screen anyways.
// If hMonitor is NULL, that's just the main screen anyway.
const RECT rcWork = RectFromMonitor(hMonitor);
if (rcWork.left < rcWork.right) {