From dae69e8c3b4b3d6e689ad89bc76c527d05c9b438 Mon Sep 17 00:00:00 2001 From: yniq Date: Thu, 5 Feb 2009 15:29:34 +0000 Subject: [PATCH] [NEW_FEATURE] Added commands for the found results pane: Goto next/previous found result (default keys: F4/Shift+F4) Switch to found results window (default key: F7) git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@412 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 15 +++++++++++++++ PowerEditor/src/Parameters.cpp | 3 +++ PowerEditor/src/resource.h | 3 +++ 3 files changed, 21 insertions(+) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 9259390c..a0103901 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3016,6 +3016,21 @@ void Notepad_plus::command(int id) } break; + case NPPM_INTERNAL_SEARCH_GOTONEXTFOUND: + { + _findReplaceDlg.gotoNextFoundResult(); + break; + } + case NPPM_INTERNAL_SEARCH_GOTOPREVFOUND: + { + _findReplaceDlg.gotoNextFoundResult(-1); + break; + } + case NPPM_INTERNAL_FOCUS_ON_FOUND_RESULTS: + { + _findReplaceDlg.focusOnFinder(); + break; + } case IDM_SEARCH_VOLATILE_FINDNEXT : case IDM_SEARCH_VOLATILE_FINDPREV : { diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 8c49b1b9..d3902e6e 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -102,6 +102,8 @@ WinMenuKeyDefinition winKeyDefs[] = { //array of accelerator keys for all std me {VK_F3, IDM_SEARCH_FINDPREV, false, false, true, NULL}, {VK_F3, IDM_SEARCH_VOLATILE_FINDNEXT, true, false, false, NULL}, {VK_F3, IDM_SEARCH_VOLATILE_FINDPREV, true, false, true, NULL}, + {VK_F4, NPPM_INTERNAL_SEARCH_GOTONEXTFOUND, false, false, false, TEXT("Goto next found result")}, + {VK_F4, NPPM_INTERNAL_SEARCH_GOTOPREVFOUND, false, false, true, TEXT("Goto previous found result")}, {VK_M, IDM_SEARCH_MARKALL, true, false, false, NULL}, {VK_M, IDM_SEARCH_UNMARKALL, true, false, true, NULL}, {VK_H, IDM_SEARCH_REPLACE, true, false, false, NULL}, @@ -116,6 +118,7 @@ WinMenuKeyDefinition winKeyDefs[] = { //array of accelerator keys for all std me {VK_NULL, IDM_SEARCH_COPYMARKEDLINES, false, false, false, NULL}, {VK_NULL, IDM_SEARCH_PASTEMARKEDLINES, false, false, false, NULL}, {VK_NULL, IDM_SEARCH_DELETEMARKEDLINES, false, false, false, NULL}, + {VK_F7, NPPM_INTERNAL_FOCUS_ON_FOUND_RESULTS,false, false, false, TEXT("Switch to found results window")}, {VK_F11, IDM_VIEW_FULLSCREENTOGGLE, false, false, false, NULL}, {VK_NULL, IDM_VIEW_ALWAYSONTOP, false, false, false, NULL}, diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index 0f1b70f3..69824d9f 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -303,6 +303,9 @@ #define NPPM_INTERNAL_RELOADNATIVELANG (NOTEPADPLUS_USER_INTERNAL + 25) #define NPPM_INTERNAL_PLUGINSHORTCUTMOTIFIED (NOTEPADPLUS_USER_INTERNAL + 26) #define NPPM_INTERNAL_SCINTILLAFINFERCLEARALL (NOTEPADPLUS_USER_INTERNAL + 27) + #define NPPM_INTERNAL_SEARCH_GOTONEXTFOUND (NOTEPADPLUS_USER_INTERNAL + 28) + #define NPPM_INTERNAL_SEARCH_GOTOPREVFOUND (NOTEPADPLUS_USER_INTERNAL + 29) + #define NPPM_INTERNAL_FOCUS_ON_FOUND_RESULTS (NOTEPADPLUS_USER_INTERNAL + 30) // See Notepad_plus_msgs.h //#define NOTEPADPLUS_USER (WM_USER + 1000)