diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml
index c39b22107..e5f072f01 100644
--- a/PowerEditor/installer/nativeLang/english.xml
+++ b/PowerEditor/installer/nativeLang/english.xml
@@ -37,6 +37,7 @@ The comments are here for explanation, it's not necessary to translate them.
+
@@ -232,6 +233,11 @@ The comments are here for explanation, it's not necessary to translate them.
+
+
+
+
+
@@ -539,11 +545,16 @@ The comments are here for explanation, it's not necessary to translate them.
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp
index 704e020c9..f777b7854 100644
--- a/PowerEditor/src/Notepad_plus.cpp
+++ b/PowerEditor/src/Notepad_plus.cpp
@@ -2205,11 +2205,11 @@ void Notepad_plus::setupColorSampleBitmapsOnMainMenuItems()
}
bitmapOnStyleMenuItemsInfo[] =
{
- { IDM_SEARCH_GONEXTMARKER5, SCE_UNIVERSAL_FOUND_STYLE_EXT5, { IDM_SEARCH_MARKALLEXT5, IDM_SEARCH_UNMARKALLEXT5, IDM_SEARCH_GOPREVMARKER5, IDM_SEARCH_STYLE5TOCLIP } },
- { IDM_SEARCH_GONEXTMARKER4, SCE_UNIVERSAL_FOUND_STYLE_EXT4, { IDM_SEARCH_MARKALLEXT4, IDM_SEARCH_UNMARKALLEXT4, IDM_SEARCH_GOPREVMARKER4, IDM_SEARCH_STYLE4TOCLIP } },
- { IDM_SEARCH_GONEXTMARKER3, SCE_UNIVERSAL_FOUND_STYLE_EXT3, { IDM_SEARCH_MARKALLEXT3, IDM_SEARCH_UNMARKALLEXT3, IDM_SEARCH_GOPREVMARKER3, IDM_SEARCH_STYLE3TOCLIP } },
- { IDM_SEARCH_GONEXTMARKER2, SCE_UNIVERSAL_FOUND_STYLE_EXT2, { IDM_SEARCH_MARKALLEXT2, IDM_SEARCH_UNMARKALLEXT2, IDM_SEARCH_GOPREVMARKER2, IDM_SEARCH_STYLE2TOCLIP } },
- { IDM_SEARCH_GONEXTMARKER1, SCE_UNIVERSAL_FOUND_STYLE_EXT1, { IDM_SEARCH_MARKALLEXT1, IDM_SEARCH_UNMARKALLEXT1, IDM_SEARCH_GOPREVMARKER1, IDM_SEARCH_STYLE1TOCLIP } },
+ { IDM_SEARCH_GONEXTMARKER5, SCE_UNIVERSAL_FOUND_STYLE_EXT5, { IDM_SEARCH_MARKALLEXT5, IDM_SEARCH_MARKONEEXT5, IDM_SEARCH_UNMARKALLEXT5, IDM_SEARCH_GOPREVMARKER5, IDM_SEARCH_STYLE5TOCLIP } },
+ { IDM_SEARCH_GONEXTMARKER4, SCE_UNIVERSAL_FOUND_STYLE_EXT4, { IDM_SEARCH_MARKALLEXT4, IDM_SEARCH_MARKONEEXT4, IDM_SEARCH_UNMARKALLEXT4, IDM_SEARCH_GOPREVMARKER4, IDM_SEARCH_STYLE4TOCLIP } },
+ { IDM_SEARCH_GONEXTMARKER3, SCE_UNIVERSAL_FOUND_STYLE_EXT3, { IDM_SEARCH_MARKALLEXT3, IDM_SEARCH_MARKONEEXT3, IDM_SEARCH_UNMARKALLEXT3, IDM_SEARCH_GOPREVMARKER3, IDM_SEARCH_STYLE3TOCLIP } },
+ { IDM_SEARCH_GONEXTMARKER2, SCE_UNIVERSAL_FOUND_STYLE_EXT2, { IDM_SEARCH_MARKALLEXT2, IDM_SEARCH_MARKONEEXT2, IDM_SEARCH_UNMARKALLEXT2, IDM_SEARCH_GOPREVMARKER2, IDM_SEARCH_STYLE2TOCLIP } },
+ { IDM_SEARCH_GONEXTMARKER1, SCE_UNIVERSAL_FOUND_STYLE_EXT1, { IDM_SEARCH_MARKALLEXT1, IDM_SEARCH_MARKONEEXT1, IDM_SEARCH_UNMARKALLEXT1, IDM_SEARCH_GOPREVMARKER1, IDM_SEARCH_STYLE1TOCLIP } },
{ IDM_SEARCH_GONEXTMARKER_DEF, SCE_UNIVERSAL_FOUND_STYLE, { IDM_SEARCH_GOPREVMARKER_DEF, IDM_SEARCH_MARKEDTOCLIP } }
};
diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc
index 835b60936..cd1eb7da7 100644
--- a/PowerEditor/src/Notepad_plus.rc
+++ b/PowerEditor/src/Notepad_plus.rc
@@ -412,6 +412,14 @@ BEGIN
MENUITEM "Using 4th Style", IDM_SEARCH_MARKALLEXT4
MENUITEM "Using 5th Style", IDM_SEARCH_MARKALLEXT5
END
+ POPUP "Mark One"
+ BEGIN
+ MENUITEM "Using 1st Style", IDM_SEARCH_MARKONEEXT1
+ MENUITEM "Using 2nd Style", IDM_SEARCH_MARKONEEXT2
+ MENUITEM "Using 3rd Style", IDM_SEARCH_MARKONEEXT3
+ MENUITEM "Using 4th Style", IDM_SEARCH_MARKONEEXT4
+ MENUITEM "Using 5th Style", IDM_SEARCH_MARKONEEXT5
+ END
POPUP "Unmark All"
BEGIN
MENUITEM "Clear 1st Style", IDM_SEARCH_UNMARKALLEXT1
diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp
index 0097aba64..d02977b2c 100644
--- a/PowerEditor/src/NppCommands.cpp
+++ b/PowerEditor/src/NppCommands.cpp
@@ -1263,10 +1263,10 @@ void Notepad_plus::command(int id)
_pEditView->getGenericSelectedText(text2Find, strSize, false);
_pEditView->getGenericWordOnCaretPos(text2Find2, strSize);
- if (text2Find[0] == '\0')
- {
- _findReplaceDlg.markAll(text2Find2, styleID, true);
- }
+ if (text2Find[0] == '\0')
+ {
+ _findReplaceDlg.markAll(text2Find2, styleID, true);
+ }
else
{
_findReplaceDlg.markAll(text2Find, styleID, lstrlen(text2Find) == lstrlen(text2Find2));
@@ -1274,6 +1274,39 @@ void Notepad_plus::command(int id)
}
break;
+ case IDM_SEARCH_MARKONEEXT1:
+ case IDM_SEARCH_MARKONEEXT2:
+ case IDM_SEARCH_MARKONEEXT3:
+ case IDM_SEARCH_MARKONEEXT4:
+ case IDM_SEARCH_MARKONEEXT5:
+ {
+ int styleID;
+ if (id == IDM_SEARCH_MARKONEEXT1)
+ styleID = SCE_UNIVERSAL_FOUND_STYLE_EXT1;
+ else if (id == IDM_SEARCH_MARKONEEXT2)
+ styleID = SCE_UNIVERSAL_FOUND_STYLE_EXT2;
+ else if (id == IDM_SEARCH_MARKONEEXT3)
+ styleID = SCE_UNIVERSAL_FOUND_STYLE_EXT3;
+ else if (id == IDM_SEARCH_MARKONEEXT4)
+ styleID = SCE_UNIVERSAL_FOUND_STYLE_EXT4;
+ else // (id == IDM_SEARCH_MARKONEEXT5)
+ styleID = SCE_UNIVERSAL_FOUND_STYLE_EXT5;
+
+ Sci_CharacterRange range = _pEditView->getSelection();
+ if (range.cpMin == range.cpMax)
+ {
+ auto caretPos = _pEditView->execute(SCI_GETCURRENTPOS, 0, 0);
+ range.cpMin = static_cast(_pEditView->execute(SCI_WORDSTARTPOSITION, caretPos, true));
+ range.cpMax = static_cast(_pEditView->execute(SCI_WORDENDPOSITION, caretPos, true));
+ }
+ if (range.cpMax > range.cpMin)
+ {
+ _pEditView->execute(SCI_SETINDICATORCURRENT, styleID);
+ _pEditView->execute(SCI_INDICATORFILLRANGE, range.cpMin, range.cpMax - range.cpMin);
+ }
+ }
+ break;
+
case IDM_SEARCH_UNMARKALLEXT1 :
case IDM_SEARCH_UNMARKALLEXT2 :
case IDM_SEARCH_UNMARKALLEXT3 :
@@ -3683,14 +3716,19 @@ void Notepad_plus::command(int id)
case IDM_SEARCH_DELETEMARKEDLINES :
case IDM_SEARCH_DELETEUNMARKEDLINES :
case IDM_SEARCH_MARKALLEXT1 :
- case IDM_SEARCH_UNMARKALLEXT1 :
case IDM_SEARCH_MARKALLEXT2 :
- case IDM_SEARCH_UNMARKALLEXT2 :
case IDM_SEARCH_MARKALLEXT3 :
- case IDM_SEARCH_UNMARKALLEXT3 :
case IDM_SEARCH_MARKALLEXT4 :
- case IDM_SEARCH_UNMARKALLEXT4 :
case IDM_SEARCH_MARKALLEXT5 :
+ case IDM_SEARCH_MARKONEEXT1 :
+ case IDM_SEARCH_MARKONEEXT2 :
+ case IDM_SEARCH_MARKONEEXT3 :
+ case IDM_SEARCH_MARKONEEXT4 :
+ case IDM_SEARCH_MARKONEEXT5 :
+ case IDM_SEARCH_UNMARKALLEXT1 :
+ case IDM_SEARCH_UNMARKALLEXT2 :
+ case IDM_SEARCH_UNMARKALLEXT3 :
+ case IDM_SEARCH_UNMARKALLEXT4 :
case IDM_SEARCH_UNMARKALLEXT5 :
case IDM_SEARCH_CLEARALLMARKS :
case IDM_FORMAT_TODOS :
diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp
index 35c4786dd..635a0a081 100644
--- a/PowerEditor/src/Parameters.cpp
+++ b/PowerEditor/src/Parameters.cpp
@@ -188,11 +188,16 @@ static const WinMenuKeyDefinition winKeyDefs[] =
{ VK_B, IDM_SEARCH_GOTOMATCHINGBRACE, true, false, false, nullptr },
{ VK_B, IDM_SEARCH_SELECTMATCHINGBRACES, true, true, false, nullptr },
{ VK_M, IDM_SEARCH_MARK, true, false, false, nullptr },
- { VK_NULL, IDM_SEARCH_MARKALLEXT1, false, false, false, TEXT("Mark search results using 1st style") },
- { VK_NULL, IDM_SEARCH_MARKALLEXT2, false, false, false, TEXT("Mark search results using 2nd style") },
- { VK_NULL, IDM_SEARCH_MARKALLEXT3, false, false, false, TEXT("Mark search results using 3rd style") },
- { VK_NULL, IDM_SEARCH_MARKALLEXT4, false, false, false, TEXT("Mark search results using 4th style") },
- { VK_NULL, IDM_SEARCH_MARKALLEXT5, false, false, false, TEXT("Mark search results using 5th style") },
+ { VK_NULL, IDM_SEARCH_MARKALLEXT1, false, false, false, TEXT("Mark all using 1st style") },
+ { VK_NULL, IDM_SEARCH_MARKALLEXT2, false, false, false, TEXT("Mark all using 2nd style") },
+ { VK_NULL, IDM_SEARCH_MARKALLEXT3, false, false, false, TEXT("Mark all using 3rd style") },
+ { VK_NULL, IDM_SEARCH_MARKALLEXT4, false, false, false, TEXT("Mark all using 4th style") },
+ { VK_NULL, IDM_SEARCH_MARKALLEXT5, false, false, false, TEXT("Mark all using 5th style") },
+ { VK_NULL, IDM_SEARCH_MARKONEEXT1, false, false, false, TEXT("Mark one using 1st style") },
+ { VK_NULL, IDM_SEARCH_MARKONEEXT2, false, false, false, TEXT("Mark one using 2nd style") },
+ { VK_NULL, IDM_SEARCH_MARKONEEXT3, false, false, false, TEXT("Mark one using 3rd style") },
+ { VK_NULL, IDM_SEARCH_MARKONEEXT4, false, false, false, TEXT("Mark one using 4th style") },
+ { VK_NULL, IDM_SEARCH_MARKONEEXT5, false, false, false, TEXT("Mark one using 5th style") },
{ VK_NULL, IDM_SEARCH_UNMARKALLEXT1, false, false, false, TEXT("Clear marks using 1st style") },
{ VK_NULL, IDM_SEARCH_UNMARKALLEXT2, false, false, false, TEXT("Clear marks using 2nd style") },
{ VK_NULL, IDM_SEARCH_UNMARKALLEXT3, false, false, false, TEXT("Clear marks using 3rd style") },
diff --git a/PowerEditor/src/contextMenu.xml b/PowerEditor/src/contextMenu.xml
index 1d63fde5b..9bd3ac482 100644
--- a/PowerEditor/src/contextMenu.xml
+++ b/PowerEditor/src/contextMenu.xml
@@ -30,11 +30,17 @@ https://npp-user-manual.org/docs/config-files/#the-context-menu-contextmenu-xml
Use FolderName (optional) to create sub-menu. FolderName can be used in any type of item.
FolderName value can be in any language.
-->
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PowerEditor/src/localization.cpp b/PowerEditor/src/localization.cpp
index e474b9085..f9c238f83 100644
--- a/PowerEditor/src/localization.cpp
+++ b/PowerEditor/src/localization.cpp
@@ -56,11 +56,12 @@ MenuPosition menuPos[] = {
{ 1, 19, -1, "edit-onSelection" },
{ 2, 18, -1, "search-markAll" },
- { 2, 19, -1, "search-unmarkAll" },
- { 2, 20, -1, "search-jumpUp" },
- { 2, 21, -1, "search-jumpDown" },
- { 2, 22, -1, "search-copyStyledText" },
- { 2, 24, -1, "search-bookmark" },
+ { 2, 19, -1, "search-markOne" },
+ { 2, 20, -1, "search-unmarkAll" },
+ { 2, 21, -1, "search-jumpUp" },
+ { 2, 22, -1, "search-jumpDown" },
+ { 2, 23, -1, "search-copyStyledText" },
+ { 2, 25, -1, "search-bookmark" },
{ 3, 4, -1, "view-currentFileIn" },
{ 3, 6, -1, "view-showSymbol" },
diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h
index e261f8b44..7b3b25af4 100644
--- a/PowerEditor/src/menuCmdID.h
+++ b/PowerEditor/src/menuCmdID.h
@@ -236,6 +236,12 @@
#define IDM_SEARCH_ALLSTYLESTOCLIP (IDM_SEARCH + 60)
#define IDM_SEARCH_MARKEDTOCLIP (IDM_SEARCH + 61)
+ #define IDM_SEARCH_MARKONEEXT1 (IDM_SEARCH + 62)
+ #define IDM_SEARCH_MARKONEEXT2 (IDM_SEARCH + 63)
+ #define IDM_SEARCH_MARKONEEXT3 (IDM_SEARCH + 64)
+ #define IDM_SEARCH_MARKONEEXT4 (IDM_SEARCH + 65)
+ #define IDM_SEARCH_MARKONEEXT5 (IDM_SEARCH + 66)
+
#define IDM_MISC (IDM + 3500)
#define IDM_FILESWITCHER_FILESCLOSE (IDM_MISC + 1)
#define IDM_FILESWITCHER_FILESCLOSEOTHERS (IDM_MISC + 2)