diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index 4067df18..5f817277 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -700,6 +700,7 @@ BEGIN MENUITEM "Import plugin(s)...", IDM_SETTING_IMPORTPLUGIN MENUITEM "Import style theme(s)...", IDM_SETTING_IMPORTSTYLETHEMS END + MENUITEM "Edit Popup ContextMenu", IDM_SETTING_EDITCONTEXTMENU END POPUP "Macro" diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 1099c18f..8dd73841 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -1643,6 +1643,14 @@ void Notepad_plus::command(int id) break; } + case IDM_SETTING_EDITCONTEXTMENU : + { + NppParameters *pNppParams = NppParameters::getInstance(); + doOpen((pNppParams->getContextMenuPath()).c_str()); + + break; + } + case IDM_VIEW_GOTO_ANOTHER_VIEW: docGotoAnotherEditView(TransferMove); checkSyncState(); diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 2fca5852..6a3ce628 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -1338,6 +1338,7 @@ public: ScintillaAccelerator * getScintillaAccelerator() {return _pScintAccelerator;}; generic_string getNppPath() const {return _nppPath;}; + generic_string getContextMenuPath() const {return _contextMenuPath;}; const TCHAR * getAppDataNppDir() const {return _appdataNppDir.c_str();}; const TCHAR * getWorkingDir() const {return _currentDirectory.c_str();}; void setWorkingDir(const TCHAR * newPath); diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 06fbd639..967e96c6 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -1199,11 +1199,12 @@ void ScintillaEditView::defineDocType(LangType typeDoc) execute(SCI_STYLECLEARALL); Buffer * buf = MainFileManager->getBufferByID(_currentBufferID); + if (buf->getEncoding() != NPP_CP_DOS_437) { buf->setEncoding(NPP_CP_DOS_437); ::SendMessage(_hParent, WM_COMMAND, IDM_FILE_RELOAD, 0); - } + } } break; diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index e2c540f3..6bbe5f54 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -391,6 +391,7 @@ #define IDM_SETTING_AUTOCNBCHAR (IDM_SETTING + 15) #define IDM_SETTING_SHORTCUT_MAPPER_MACRO (IDM_SETTING + 16) #define IDM_SETTING_SHORTCUT_MAPPER_RUN (IDM_SETTING + 17) + #define IDM_SETTING_EDITCONTEXTMENU (IDM_SETTING + 18) #define IDM_EXECUTE (IDM + 9000)