diff --git a/PowerEditor/bin/change.log b/PowerEditor/bin/change.log
index 70023a96..b94856df 100644
--- a/PowerEditor/bin/change.log
+++ b/PowerEditor/bin/change.log
@@ -4,21 +4,24 @@ Notepad++ v5.4 new features and fixed bugs (from v5.3.1) :
2. Add google chrome drag and derop tab feature : drag out tab to create a new instance, transfer documents among several instances by drag and drop.
3. Add Mark all extension : user can mark any occurrence with 5 different colours.
4. Add new feature : column selection allows to insertion a string by typing characters in sequence (w/o column mode editor).
-5. Fixed crash bug : Double click a file associated with an older version of Notepad++ while a newer version of Notepad++ instance is running.
-6. Improve main menu structure (more compact). Language Menu can be compacted as well (optional, in Preference dialog).
-7. line numbers margin width is changed dynamically according to the needed space (but keeping at least 3 digits).
-8. File history list (under the File menu) is limited to 100 characters per item. Longer file names are fitted to 100 characters by replacing path components with ellipses.
-9. Update Scintilla from v1.75 to v1.77.
-10. Fixed two bugs when calculating the width of the TaskList (document list when pressing ctrl+tab or right-click + mouse wheel.
-11. Add an (hidden) option to make the "Filters" and "Directory" fields follow the current opened document in "Find in files" dialog. The new parameters are located in config.xml and are called: "fifFilterFollowsDoc" and "fifFolderFollowsDoc" (set to "yes"/"no")
-12. Add new command parameters : -c (column) -x et -y (startup position).
-13. Remove change line marker which does not work correctly. Include ChangeMarkers plugin instead.
-14. Fix bug "Switch to found results window" command now switches back to the current edit view if the focus is already on the found results.
-15. Fix the search result inaccurate colorization bug.
-16. Fix the Mark all in selection bug (while Find Replace Dialog loosing the focus).
-17. Add 2 plugins messages : NPPN_FILEBEFORELOAD and NPPN_FILELOADFAILED.
-18. Fix New document not be switched while double clicking in Find in files result panel.
-19. Fix conversion min to Maj and Maj to min (or vice et versa) in column selection bug.
+5. Detect UTF16 encoding (BE and LE) w/o BOM.
+6. Iixed crash bug : Double click a file associated with an older version of Notepad++ while a newer version of Notepad++ instance is running.
+7. lmprove main menu structure (more compact). Language Menu can be compacted as well (optional, in Preference dialog).
+8. Fine numbers margin width is changed dynamically according to the needed space (but keeping at least 3 digits).
+9. ile history list (under the File menu) is limited to 100 characters per item. Longer file names are fitted to 100 characters by replacing path components with ellipses.
+10. Update Scintilla from v1.75 to v1.77.
+11. Indent guideline can be shown w/o whitespace or tab symbol.
+12. Fixed two bugs when calculating the width of the TaskList (document list when pressing ctrl+tab or right-click + mouse wheel.
+13. Add an (hidden) option to make the "Filters" and "Directory" fields follow the current opened document in "Find in files" dialog. The new parameters are located in config.xml and are called: "fifFilterFollowsDoc" and "fifFolderFollowsDoc" (set to "yes"/"no")
+14. Add new command parameters : -c (column) -x et -y (startup position).
+15. Remove change line marker which does not work correctly. Include ChangeMarkers plugin instead.
+16. Fix bug "Switch to found results window" command now switches back to the current edit view if the focus is already on the found results.
+17. Fix the search result inaccurate colorization bug.
+18. Fix the Mark all in selection bug (while Find Replace Dialog loosing the focus).
+19. Add 2 plugins messages : NPPN_FILEBEFORELOAD and NPPN_FILELOADFAILED.
+20. Fix New document not be switched while double clicking in Find in files result panel.
+21. Fix conversion min to Maj and Maj to min (or vice et versa) in column selection bug.
+
Included plugins (Unicode):
@@ -30,7 +33,7 @@ Included plugins (Unicode):
6. NppExport v0.2.8
7. Doc Monitor v2.2
8. NppNetNote v0.1
-9. ChangeMarkers 1.1.0
+9. ChangeMarkers 1.2.0
Included plugins (ANSI):
@@ -43,4 +46,4 @@ Included plugins (ANSI):
7. Light Explorer v1.5
8. Doc Monitor v2.2
9. NppNetNote v0.1
-10. ChangeMarkers 1.1.0
+10. ChangeMarkers 1.2.0
diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp
index 314e1bc6..d1446ab1 100644
--- a/PowerEditor/src/Notepad_plus.cpp
+++ b/PowerEditor/src/Notepad_plus.cpp
@@ -3313,9 +3313,10 @@ void Notepad_plus::command(int id)
const int strSize = FINDREPLACE_MAXLENGTH;
TCHAR str[strSize];
- _pEditView->getGenericSelectedText(str, strSize, false);
- if (0!=str[0]) // the selected text is not empty, then use it
- _incrementFindDlg.setSearchText(str, _pEditView->getCurrentBuffer()->getUnicodeMode() != uni8Bit); _incrementFindDlg.display();
+ _pEditView->getGenericSelectedText(str, strSize);
+ _incrementFindDlg.setSearchText(str, _pEditView->getCurrentBuffer()->getUnicodeMode() != uni8Bit);
+
+ _incrementFindDlg.display();
}
break;
diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h
index 8cdd1f69..7d2057ee 100644
--- a/PowerEditor/src/Notepad_plus.h
+++ b/PowerEditor/src/Notepad_plus.h
@@ -282,8 +282,6 @@ private:
WindowsMenu _windowsMenu;
HMENU _mainMenuHandle;
- HMENU _menuLang;
- HMENU _menuLangCompact;
bool _sysMenuEntering;
diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp
index 14e36092..e6a710d1 100644
--- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp
+++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp
@@ -1095,7 +1095,7 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, FindOption *options)
endPosition = 0;
}
- if (FirstIncremental==pOptions->_incrementalType)
+ if (pOptions->_isIncremental)
{
startPosition = 0;
endPosition = docLength;
@@ -1114,22 +1114,14 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, FindOption *options)
//when wrapping, use the rest of the document (entire document is usable)
if (pOptions->_whichDirection == DIR_DOWN)
{
- // the text to find is modified so use the current position
- startPosition = cr.cpMin;
- endPosition = docLength;
+ startPosition = 0;
+ endPosition = docLength;
+ }
+ else
+ {
+ startPosition = docLength;
+ endPosition = 0;
}
- else if (NextIncremental==pOptions->_incrementalType)
- {
- // text to find is not modified, so use current position +1
- startPosition = cr.cpMin +1;
- endPosition = docLength;
- if (pOptions->_whichDirection == DIR_UP)
- {
- //When searching upwards, start is the lower part, end the upper, for backwards search
- startPosition = cr.cpMax - 1;
- endPosition = 0;
- }
- }
//new target, search again
posFind = (*_ppEditView)->searchInTarget(pText, startPosition, endPosition);
@@ -1137,7 +1129,7 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, FindOption *options)
if (posFind == -1)
{
//failed, or failed twice with wrap
- if (NotIncremental==pOptions->_incrementalType) //incremental search doesnt trigger messages
+ if (!pOptions->_isIncremental) //incremental search doesnt trigger messages
{
generic_string msg = TEXT("Can't find the text:\r\n\"");
msg += pText;
@@ -1848,13 +1840,10 @@ void FindIncrementDlg::display(bool toShow) const
return;
}
if (toShow)
- // select the whole find editor text
- ::SendDlgItemMessage(_hSelf, IDC_INCFINDTEXT, EM_SETSEL, 0, -1);
+ ::SetFocus(::GetDlgItem(_hSelf, IDC_INCFINDTEXT));
_pRebar->setIDVisible(_rbBand.wID, toShow);
}
-#define SHIFTED 0x8000
-
BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
@@ -1873,53 +1862,27 @@ BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
case IDC_INCFINDPREVOK :
case IDC_INCFINDNXTOK :
- case IDOK :
{
FindOption fo;
fo._isWholeWord = false;
fo._isMatchCase = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_INCFINDMATCHCASE, BM_GETCHECK, 0, 0));
if (LOWORD(wParam) == IDC_INCFINDPREVOK)
fo._whichDirection = DIR_UP;
- else if (LOWORD(wParam) == IDOK)
- {
- SHORT nVirtKey = GetKeyState(VK_SHIFT);
- if (nVirtKey & SHIFTED)
- fo._whichDirection = DIR_UP;
- }
generic_string str2Search = _pFRDlg->getTextFromCombo(::GetDlgItem(_hSelf, IDC_INCFINDTEXT), isUnicode);
_pFRDlg->processFindNext(str2Search.c_str(), &fo);
}
return TRUE;
- case IDC_INCFINDTEXT :
- {
- switch(HIWORD(wParam))
- {
- case EN_CHANGE :
- {
- FindOption fo;
- fo._isWholeWord = false;
- fo._isMatchCase = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_INCFINDMATCHCASE, BM_GETCHECK, 0, 0));
- fo._incrementalType = FirstIncremental;
-
- generic_string str2Search = _pFRDlg->getTextFromCombo(::GetDlgItem(_hSelf, IDC_INCFINDTEXT), isUnicode);
- _pFRDlg->processFindNext(str2Search.c_str(), &fo);
- }
- return TRUE;
- case EN_KILLFOCUS :
- case EN_SETFOCUS :
- break;
- }
- }
- return TRUE;
-
-
case IDC_INCFINDMATCHCASE:
+ case IDC_INCFINDTEXT :
+ case IDC_INCFINDHILITEALL :
{
+ if (_doSearchFromBegin)
+ {
FindOption fo;
fo._isWholeWord = false;
- fo._incrementalType = NextIncremental;
+ fo._isIncremental = true;
fo._isMatchCase = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_INCFINDMATCHCASE, BM_GETCHECK, 0, 0));
generic_string str2Search = _pFRDlg->getTextFromCombo(::GetDlgItem(_hSelf, IDC_INCFINDTEXT), isUnicode);
@@ -1929,22 +1892,15 @@ BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
CharacterRange range = (*(_pFRDlg->_ppEditView))->getSelection();
(*(_pFRDlg->_ppEditView))->execute(SCI_SETSEL, -1, range.cpMin);
}
- }
-
- case IDC_INCFINDHILITEALL :
- {
- FindOption fo;
- fo._isWholeWord = false;
- fo._incrementalType = FirstIncremental;
- fo._isMatchCase = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_INCFINDMATCHCASE, BM_GETCHECK, 0, 0));
-
- generic_string str2Search = _pFRDlg->getTextFromCombo(::GetDlgItem(_hSelf, IDC_INCFINDTEXT), isUnicode);
bool isHiLieAll = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_INCFINDHILITEALL, BM_GETCHECK, 0, 0));
if (str2Search == TEXT(""))
isHiLieAll = false;
markSelectedTextInc(isHiLieAll, &fo);
+ }
+ else
+ _doSearchFromBegin = true;
}
return TRUE;
diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h
index 59f3fd3a..bb34c13a 100644
--- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h
+++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h
@@ -53,7 +53,6 @@ struct TargetRange {
int targetEnd;
};
-enum SearchIncrementalType { NotIncremental, FirstIncremental, NextIncremental };
enum SearchType { FindNormal, FindExtended, FindRegex };
enum ProcessOperation { ProcessFindAll, ProcessReplaceAll, ProcessCountAll, ProcessMarkAll, ProcessMarkAll_2, ProcessMarkAll_IncSearch, ProcessMarkAllExt };
@@ -62,11 +61,10 @@ struct FindOption {
bool _isMatchCase;
bool _isWrapAround;
bool _whichDirection;
-
- SearchIncrementalType _incrementalType;
+ bool _isIncremental;
SearchType _searchType;
FindOption() :_isWholeWord(true), _isMatchCase(true), _searchType(FindNormal),\
- _isWrapAround(true), _whichDirection(DIR_DOWN), _incrementalType(NotIncremental){};
+ _isWrapAround(true), _whichDirection(DIR_DOWN), _isIncremental(false){};
};
//This class contains generic search functions as static functions for easy access
@@ -556,6 +554,7 @@ public :
virtual void display(bool toShow = true) const;
void setSearchText(const TCHAR * txt2find, bool isUTF8 = false) {
+ _doSearchFromBegin = false;
#ifdef UNICODE
::SendDlgItemMessage(_hSelf, IDC_INCFINDTEXT, WM_SETTEXT, 0, (LPARAM)txt2find);
#else
@@ -587,6 +586,7 @@ private :
ReBar * _pRebar;
REBARBANDINFO _rbBand;
+ bool _doSearchFromBegin;
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
void markSelectedTextInc(bool enable, FindOption *opt = NULL);
};
diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.rc b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.rc
index 6802c580..fbcb5d15 100644
--- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.rc
+++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.rc
@@ -81,9 +81,9 @@ FONT 8, TEXT("MS Shell Dlg")
BEGIN
PUSHBUTTON "X",IDCANCEL,2,3,16,14
RTEXT "Find :",IDC_INCSTATIC,20,6,25,12
- EDITTEXT IDC_INCFINDTEXT,45,4,175,12,ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_BORDER | WS_TABSTOP /*|WS_GROUP*/ ,WS_EX_STATICEDGE
- PUSHBUTTON "<",IDC_INCFINDPREVOK | WS_TABSTOP,223,3,16,14
- PUSHBUTTON ">",IDC_INCFINDNXTOK | WS_TABSTOP,243,3,16,14
+ EDITTEXT IDC_INCFINDTEXT,45,4,175,12,ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_BORDER,WS_EX_STATICEDGE
+ PUSHBUTTON "<",IDC_INCFINDPREVOK,223,3,16,14
+ DEFPUSHBUTTON ">",IDC_INCFINDNXTOK,243,3,16,14
CONTROL "Highlight all", IDC_INCFINDHILITEALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,5,65,12
CONTROL "Match case", IDC_INCFINDMATCHCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,335,5,60,12
END
diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.rc b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.rc
index aa6ae944..b2aa5713 100644
--- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.rc
+++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.rc
@@ -30,7 +30,7 @@ EXSTYLE WS_EX_TOOLWINDOW
CAPTION "Style Configurator"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- LTEXT "Switch to theme : ",IDC_SWITCH2THEME_STATIC,6,9,83,8,0,WS_EX_RIGHT
+ LTEXT "Select theme : ",IDC_SWITCH2THEME_STATIC,6,9,83,8,0,WS_EX_RIGHT
COMBOBOX IDC_SWITCH2THEME_COMBO,95,7,104,78,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "Foreground color",IDC_FG_STATIC,203,72,59,8,0,WS_EX_RIGHT
LTEXT "Background color",IDC_BG_STATIC,203,99,59,8,0,WS_EX_RIGHT
diff --git a/PowerEditor/src/WinControls/ContextMenu/ContextMenu.h b/PowerEditor/src/WinControls/ContextMenu/ContextMenu.h
index 12aca7ae..67e5ba0f 100644
--- a/PowerEditor/src/WinControls/ContextMenu/ContextMenu.h
+++ b/PowerEditor/src/WinControls/ContextMenu/ContextMenu.h
@@ -28,13 +28,19 @@ using namespace std;
struct MenuItemUnit {
unsigned long _cmdID;
generic_string _itemName;
- MenuItemUnit() : _cmdID(0), _itemName(TEXT("")) {};
- MenuItemUnit(unsigned long cmdID, generic_string itemName) : _cmdID(cmdID), _itemName(itemName) {};
- MenuItemUnit(unsigned long cmdID, const TCHAR *itemName) : _cmdID(cmdID){
+ generic_string _subMenuName;
+ MenuItemUnit() : _cmdID(0), _itemName(TEXT("")), _subMenuName(TEXT("")) {};
+ MenuItemUnit(unsigned long cmdID, generic_string itemName, generic_string subMenuName=TEXT("")) : _cmdID(cmdID), _itemName(itemName), _subMenuName(subMenuName) {};
+ MenuItemUnit(unsigned long cmdID, const TCHAR *itemName, const TCHAR *subMenuName=NULL) : _cmdID(cmdID){
if (!itemName)
_itemName = TEXT("");
else
_itemName = itemName;
+
+ if (!subMenuName)
+ _subMenuName = TEXT("");
+ else
+ _subMenuName = subMenuName;
};
};
diff --git a/PowerEditor/src/contextMenu.xml b/PowerEditor/src/contextMenu.xml
index 19b66b21..7034dca1 100644
--- a/PowerEditor/src/contextMenu.xml
+++ b/PowerEditor/src/contextMenu.xml
@@ -19,8 +19,8 @@
-
-
+
+