diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 2ddc2732..07e02a11 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1889,13 +1889,6 @@ void Notepad_plus::setUniModeText() } -void Notepad_plus::charAdded(TCHAR chAdded) -{ - bool indentMaintain = NppParameters::getInstance()->getNppGUI()._maitainIndent; - if (indentMaintain) - MaintainIndentation(chAdded); -} - void Notepad_plus::addHotSpot(bool docIsModifing) { //bool docIsModifing = true; @@ -4844,7 +4837,7 @@ struct Quote{ const char *_quote; }; -const int nbQuote = 74; +const int nbQuote = 75; Quote quotes[nbQuote] = { {"Notepad++", "Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size.\nBy optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment."}, {"Martin Golding", "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."}, @@ -4916,6 +4909,7 @@ Quote quotes[nbQuote] = { {"Anonymous #40", "People ask me why, as an atheist, I still say: OH MY GOD.\nIt makes perfect sense: We say \"Oh my God\" when something is UNBELIEVABLE."}, {"Anonymous #41", "1. Dig a hole.\n2. Name it love.\n3. Watch people falling in love.\n"}, {"Anonymous #42", "Don't think of yourself as an ugly person.\nThink of yourself as a beautiful monkey."}, +{"Anonymous #43", "Afraid to die alone?\nBecome a bus driver."}, {"Hustle Man", "Politicians are like sperm.\nOne in a million turn out to be an actual human being."}, {"Confucius", "It's good to meet girl in park.\nBut better to park meat in girl."}, {"Friedrich Nietzsche", "There is not enough love and goodness in the world to permit giving any of it away to imaginary beings."}, diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index 6fbfdebe..484edf13 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -507,7 +507,6 @@ private: void checkMenuItem(int itemID, bool willBeChecked) const { ::CheckMenuItem(_mainMenuHandle, itemID, MF_BYCOMMAND | (willBeChecked?MF_CHECKED:MF_UNCHECKED)); }; - void charAdded(TCHAR chAdded); void MaintainIndentation(TCHAR ch); void addHotSpot(bool docIsModifing = false); diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index 42b1c74c..0003bf1d 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -409,7 +409,9 @@ BOOL Notepad_plus::notify(SCNotification *notification) case SCN_CHARADDED: { - charAdded(static_cast(notification->ch)); + bool indentMaintain = NppParameters::getInstance()->getNppGUI()._maitainIndent; + if (indentMaintain) + MaintainIndentation(static_cast(notification->ch)); AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub; autoC->update(notification->ch); break;