mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 19:39:17 +02:00
IDE: implemented find next/previous word occurrence
git-svn-id: trunk@9916 -
This commit is contained in:
parent
c8913db097
commit
9e2483124a
@ -761,6 +761,7 @@ var
|
||||
or MultiLinePatternFits then begin
|
||||
// the whole pattern fits
|
||||
Result:=true;
|
||||
//DebugLn(['CheckFound Found=',dbgs(FoundStartPos),'..',dbgs(FoundEndPos),' Range=',dbgs(StartPos),'..',dbgs(EndPos)]);
|
||||
FoundInRange:=(CompareCarets(FoundEndPos,EndPos)>=0)
|
||||
and (CompareCarets(FoundStartPos,StartPos)<=0);
|
||||
end else
|
||||
@ -772,9 +773,15 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
if Pattern='' then exit;
|
||||
if Lines.Count=0 then exit;
|
||||
if Lines.Count=0 then begin
|
||||
//DebugLn(['TSynEditSearch.FindNextOne Lines.Count=0']);
|
||||
exit;
|
||||
end;
|
||||
FixRange;
|
||||
if StartPos.Y>Lines.Count then exit;
|
||||
if StartPos.Y>Lines.Count then begin
|
||||
//DebugLn(['TSynEditSearch.FindNextOne StartPos.Y>Lines.Count']);
|
||||
exit;
|
||||
end;
|
||||
MinY:=Max(0,StartPos.Y-1);
|
||||
MaxY:=Min(Lines.Count-1,EndPos.Y-1);
|
||||
if MinY>MaxY then exit;
|
||||
@ -832,19 +839,26 @@ begin
|
||||
LineLen:=length(LineStr);
|
||||
Line:=PChar(LineStr);
|
||||
if not IsFirstLine then begin
|
||||
if FBackwards then
|
||||
if FBackwards then begin
|
||||
if fRegExpr then
|
||||
x:=LineLen-1
|
||||
else
|
||||
x:=LineLen-SearchLen;
|
||||
end else
|
||||
x:=0;
|
||||
end else begin
|
||||
IsFirstLine:=false;
|
||||
if FBackwards then begin
|
||||
x:=EndPos.X-1;
|
||||
if fRegExpr then
|
||||
x:=EndPos.X-2
|
||||
else
|
||||
x:=EndPos.X-SearchLen-1;
|
||||
end else begin
|
||||
x:=StartPos.X-1;
|
||||
end;
|
||||
end;
|
||||
x:=MinMax(x,0,LineLen-1);
|
||||
//DebugLn(['TSynEditSearch.FindNextOne Line="',LineStr,'" x=',x,' LineLen=',LineLen]);
|
||||
|
||||
// search in the line
|
||||
if fRegExpr then begin
|
||||
@ -872,8 +886,9 @@ begin
|
||||
end else begin
|
||||
//DebugLn(['TSynEditSearch.FindNextOne x=',x,' MaxPos=',MaxPos,' Line="',Line,'"']);
|
||||
while (x>=0) and (x<=MaxPos) do begin
|
||||
//DebugLn(['TSynEditSearch.FindNextOne x=',x]);
|
||||
if CompTable[Line[x]]=CompTable[SearchFor^] then begin
|
||||
//DebugLn(['TSynEditSearch.FindNextOne x=',x,' Line[x]=',Line[x]]);
|
||||
//DebugLn(['TSynEditSearch.FindNextOne First character found x=',x,' Line[x]=',Line[x]]);
|
||||
if (not fWhole)
|
||||
or (x=0) or DelimTable[Line[x-1]] then begin
|
||||
i:=1;
|
||||
@ -885,7 +900,12 @@ begin
|
||||
// the pattern fits to this position
|
||||
FoundStartPos:=Point(x+1,y+1);
|
||||
FoundEndPos:=Point(x+i+1,y+1);
|
||||
if CheckFound(Result) then exit;
|
||||
if CheckFound(Result) then begin
|
||||
//DebugLn(['TSynEditSearch.FindNextOne CheckFound success Result=',Result]);
|
||||
exit;
|
||||
end else begin
|
||||
//DebugLn(['TSynEditSearch.FindNextOne CheckFound failed']);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -352,6 +352,8 @@ begin
|
||||
ecReplace: SetResult2(VK_R,[SSCtrl],VK_UNKNOWN,[], VK_Q,[SSCtrl],VK_A,[]);
|
||||
ecIncrementalFind: SetResult(VK_E,[SSCtrl],VK_UNKNOWN,[]);
|
||||
ecGotoLineNumber: SetResult2(VK_G,[ssCtrl],VK_UNKNOWN,[],VK_Q,[SSCtrl],VK_G,[]);
|
||||
ecFindNextWordOccurrence: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecFindPrevWordOccurrence: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecJumpBack: SetResult(VK_H,[ssCtrl],VK_UNKNOWN,[]);
|
||||
ecJumpForward: SetResult(VK_H,[ssCtrl,ssShift],VK_UNKNOWN,[]);
|
||||
ecAddJumpPoint: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
@ -666,6 +668,8 @@ begin
|
||||
ecReplace: SetResult(VK_Q,[SSCtrl],VK_A,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecIncrementalFind: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecGotoLineNumber: SetResult(VK_G,[ssCtrl],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecFindNextWordOccurrence: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecFindPrevWordOccurrence: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecJumpBack: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecJumpForward: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
ecAddJumpPoint: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
@ -1296,6 +1300,8 @@ begin
|
||||
ecFindProcedureDefinition: Result:= srkmecFindProcedureDefinition;
|
||||
ecFindProcedureMethod : Result:= srkmecFindProcedureMethod;
|
||||
ecGotoLineNumber : Result:= srkmecGotoLineNumber;
|
||||
ecFindNextWordOccurrence : Result:= srkmecFindNextWordOccurrence;
|
||||
ecFindPrevWordOccurrence : Result:= srkmecFindPrevWordOccurrence;
|
||||
ecJumpBack : Result:= lismenujumpback;
|
||||
ecJumpForward : Result:= lismenujumpforward;
|
||||
ecAddJumpPoint : Result:= srkmecAddJumpPoint;
|
||||
@ -2156,6 +2162,8 @@ begin
|
||||
AddDefault(C,'Replace text',ecReplace);
|
||||
AddDefault(C,'Find incremental',ecIncrementalFind);
|
||||
AddDefault(C,'Go to line number',ecGotoLineNumber);
|
||||
AddDefault(C,'Find next word occurrence',ecFindNextWordOccurrence);
|
||||
AddDefault(C,'Find previous word occurrence',ecFindPrevWordOccurrence);
|
||||
AddDefault(C,'Jump back',ecJumpBack);
|
||||
AddDefault(C,'Jump forward',ecJumpForward);
|
||||
AddDefault(C,'Add jump point',ecAddJumpPoint);
|
||||
|
@ -1508,6 +1508,8 @@ resourcestring
|
||||
srkmecFindProcedureDefinition = 'Find procedure definiton';
|
||||
srkmecFindProcedureMethod = 'Find procedure method';
|
||||
srkmecGotoLineNumber = 'Go to line number';
|
||||
srkmecFindNextWordOccurrence = 'Find next word occurrence';
|
||||
srkmecFindPrevWordOccurrence = 'Find previous word occurrence';
|
||||
srkmecAddJumpPoint = 'Add jump point';
|
||||
srkmecOpenFileAtCursor = 'Open file at cursor';
|
||||
srkmecGotoIncludeDirective = 'Go to to include directive of current include file';
|
||||
|
@ -381,7 +381,6 @@ procedure TProjectOptionsDialog.ProjectOptionsClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
var
|
||||
NewFlags: TProjectFlags;
|
||||
OldUseVersionInfo: Boolean;
|
||||
|
||||
procedure SetProjectFlag(AFlag: TProjectFlag; AValue: Boolean);
|
||||
begin
|
||||
@ -432,7 +431,6 @@ begin
|
||||
Project.LazDocPaths:=StringListToText(LazDocListBox.Items,';',true);
|
||||
|
||||
// VersionInfo
|
||||
OldUseVersionInfo:=Project.VersionInfo.UseVersionInfo;
|
||||
Project.VersionInfo.UseVersionInfo:=UseVersionInfoCheckBox.Checked;
|
||||
Project.VersionInfo.AutoIncrementBuild:=AutomaticallyIncreaseBuildCheckBox.Checked;
|
||||
Project.VersionInfo.VersionNr:=VersionSpinEdit.Value;
|
||||
|
@ -218,7 +218,7 @@ type
|
||||
procedure DecreaseIgnoreCodeBufferLock; override;
|
||||
procedure UpdateCodeBuffer; override;// copy the source from EditorComponent
|
||||
|
||||
// dialogs
|
||||
// find
|
||||
procedure StartFindAndReplace(Replace:boolean);
|
||||
procedure AskReplace(Sender: TObject; const ASearch, AReplace:
|
||||
string; Line, Column: integer; var Action: TSrcEditReplaceAction); override;
|
||||
@ -227,8 +227,11 @@ type
|
||||
function DoFindAndReplace: Integer;
|
||||
procedure FindNext;
|
||||
procedure FindPrevious;
|
||||
procedure FindNextWordOccurrence(DirectionForward: boolean);
|
||||
procedure InitGotoDialog;
|
||||
procedure ShowGotoLineDialog;
|
||||
|
||||
// dialogs
|
||||
procedure GetDialogPosition(Width, Height:integer; out Left,Top:integer);
|
||||
procedure ActivateHint(ClientPos: TPoint; const TheHint: string);
|
||||
|
||||
@ -424,6 +427,8 @@ type
|
||||
procedure HighlighterClicked(Sender: TObject);
|
||||
procedure FindDeclarationClicked(Sender: TObject);
|
||||
procedure ProcedureJumpClicked(Sender: TObject);
|
||||
procedure FindNextWordOccurrenceClicked(Sender: TObject);
|
||||
procedure FindPrevWordOccurrenceClicked(Sender: TObject);
|
||||
procedure MoveEditorLeftClicked(Sender: TObject);
|
||||
procedure MoveEditorRightClicked(Sender: TObject);
|
||||
procedure NotebookPageChanged(Sender: TObject);
|
||||
@ -781,7 +786,10 @@ const
|
||||
|
||||
var
|
||||
SrcEditMenuFindDeclaration: TIDEMenuCommand;
|
||||
// finding / jumping
|
||||
SrcEditMenuProcedureJump: TIDEMenuCommand;
|
||||
SrcEditMenuFindNextWordOccurrence: TIDEMenuCommand;
|
||||
SrcEditMenuFindPrevWordOccurrence: TIDEMenuCommand;
|
||||
SrcEditMenuOpenFileAtCursor: TIDEMenuCommand;
|
||||
SrcEditMenuClosePage: TIDEMenuCommand;
|
||||
SrcEditMenuCut: TIDEMenuCommand;
|
||||
@ -844,20 +852,31 @@ begin
|
||||
SrcEditMenuSectionFirstDynamic:=RegisterIDEMenuSection(AParent,
|
||||
'First dynamic section');
|
||||
// register the first static section
|
||||
SrcEditMenuSectionFirstStatic:=RegisterIDEMenuSection(AParent,'First static section');
|
||||
SrcEditMenuSectionFirstStatic:=RegisterIDEMenuSection(AParent,
|
||||
'First static section');
|
||||
AParent:=SrcEditMenuSectionFirstStatic;
|
||||
SrcEditMenuFindDeclaration:=RegisterIDEMenuCommand(AParent,'Find Declaration',
|
||||
uemFindDeclaration);
|
||||
SrcEditMenuFindDeclaration:=RegisterIDEMenuCommand(AParent,
|
||||
'Find Declaration',uemFindDeclaration);
|
||||
// register the sub menu Find
|
||||
SrcEditSubMenuFind:=RegisterIDESubMenu(AParent, 'Find section', lisMenuFind
|
||||
);
|
||||
AParent:=SrcEditSubMenuFind;
|
||||
SrcEditMenuProcedureJump:=RegisterIDEMenuCommand(AParent,'Procedure Jump',
|
||||
uemProcedureJump);
|
||||
SrcEditMenuFindNextWordOccurrence:=RegisterIDEMenuCommand(AParent,
|
||||
'Find next word occurrence',srkmecFindNextWordOccurrence);
|
||||
SrcEditMenuFindPrevWordOccurrence:=RegisterIDEMenuCommand(AParent,
|
||||
'Find previous word occurrence',srkmecFindPrevWordOccurrence);
|
||||
|
||||
AParent:=SrcEditMenuSectionFirstStatic;
|
||||
SrcEditMenuOpenFileAtCursor:=RegisterIDEMenuCommand(AParent,
|
||||
'Open File At Cursor',uemOpenFileAtCursor);
|
||||
SrcEditMenuClosePage:=RegisterIDEMenuCommand(AParent,
|
||||
'Close Page',uemClosePage);
|
||||
|
||||
// register the Clipboard section
|
||||
AParent:=SourceEditorMenuRoot;
|
||||
SrcEditMenuSectionClipboard:=RegisterIDEMenuSection(AParent,'Clipboard');
|
||||
SrcEditMenuSectionClipboard:=RegisterIDEMenuSection(SourceEditorMenuRoot,
|
||||
'Clipboard');
|
||||
AParent:=SrcEditMenuSectionClipboard;
|
||||
SrcEditMenuCut:=RegisterIDEMenuCommand(AParent,'Cut',uemCut);
|
||||
SrcEditMenuCopy:=RegisterIDEMenuCommand(AParent,'Copy',uemCopy);
|
||||
@ -866,13 +885,11 @@ begin
|
||||
uemCopyFilename);
|
||||
|
||||
// register the Marks section
|
||||
AParent:=SourceEditorMenuRoot;
|
||||
SrcEditMenuSectionMarks:=RegisterIDEMenuSection(AParent,'Marks section');
|
||||
AParent:=SrcEditMenuSectionMarks;
|
||||
|
||||
SrcEditMenuSectionMarks:=RegisterIDEMenuSection(SourceEditorMenuRoot,
|
||||
'Marks section');
|
||||
// register the Goto Bookmarks Submenu
|
||||
SrcEditSubMenuGotoBookmarks:=RegisterIDESubMenu(AParent,'Goto bookmarks',
|
||||
uemGotoBookmark);
|
||||
SrcEditSubMenuGotoBookmarks:=RegisterIDESubMenu(SrcEditMenuSectionMarks,
|
||||
'Goto bookmarks',uemGotoBookmark);
|
||||
AParent:=SrcEditSubMenuGotoBookmarks;
|
||||
for I := 0 to 9 do
|
||||
RegisterIDEMenuCommand(AParent,'GotoBookmark'+IntToStr(I),
|
||||
@ -883,9 +900,8 @@ begin
|
||||
'Goto previous Bookmark',uemPrevBookmark);
|
||||
|
||||
// register the Set Bookmarks Submenu
|
||||
AParent:=SrcEditMenuSectionMarks;
|
||||
SrcEditSubMenuSetBookmarks:=RegisterIDESubMenu(AParent,'Set bookmarks',
|
||||
uemSetBookmark);
|
||||
SrcEditSubMenuSetBookmarks:=RegisterIDESubMenu(SrcEditMenuSectionMarks,
|
||||
'Set bookmarks',uemSetBookmark);
|
||||
AParent:=SrcEditSubMenuSetBookmarks;
|
||||
for I := 0 to 9 do
|
||||
RegisterIDEMenuCommand(AParent,'SetBookmark'+IntToStr(I),
|
||||
@ -894,14 +910,8 @@ begin
|
||||
'Set a free Bookmark',uemSetFreeBookmark);
|
||||
|
||||
// register the Debug submenu
|
||||
AParent:=SrcEditMenuSectionMarks;
|
||||
SrcEditSubMenuDebug:=RegisterIDESubMenu(AParent,'Debug',uemDebugWord);
|
||||
|
||||
// register the File Specific dynamic section
|
||||
AParent:=SourceEditorMenuRoot;
|
||||
SrcEditMenuSectionFileDynamic:=RegisterIDEMenuSection(AParent,
|
||||
'File dynamic section');
|
||||
|
||||
SrcEditSubMenuDebug:=RegisterIDESubMenu(SrcEditMenuSectionMarks,
|
||||
'Debug',uemDebugWord);
|
||||
AParent:=SrcEditSubMenuDebug;
|
||||
// register the Debug submenu items
|
||||
SrcEditMenuAddBreakpoint:=RegisterIDEMenuCommand(AParent,'Add Breakpoint',
|
||||
@ -913,9 +923,15 @@ begin
|
||||
SrcEditMenuViewCallStack:=RegisterIDEMenuCommand(AParent,
|
||||
'View Call Stack',uemViewCallStack);
|
||||
|
||||
// register the Move Page section
|
||||
// register the File Specific dynamic section
|
||||
AParent:=SourceEditorMenuRoot;
|
||||
SrcEditMenuSectionMovePage:=RegisterIDEMenuSection(AParent,'Move Page section');
|
||||
SrcEditMenuSectionFileDynamic:=RegisterIDEMenuSection(AParent,
|
||||
'File dynamic section');
|
||||
|
||||
|
||||
// register the Move Page section
|
||||
SrcEditMenuSectionMovePage:=RegisterIDEMenuSection(SourceEditorMenuRoot,
|
||||
'Move Page section');
|
||||
AParent:=SrcEditMenuSectionMovePage;
|
||||
SrcEditMenuMoveEditorLeft:=RegisterIDEMenuCommand(AParent,'MoveEditorLeft',
|
||||
uemMoveEditorLeft);
|
||||
@ -923,8 +939,8 @@ begin
|
||||
uemMoveEditorRight);
|
||||
|
||||
// register the Refactoring submenu
|
||||
AParent:=SourceEditorMenuRoot;
|
||||
SrcEditSubMenuRefactor:=RegisterIDESubMenu(AParent,'Refactoring',uemRefactor);
|
||||
SrcEditSubMenuRefactor:=RegisterIDESubMenu(SourceEditorMenuRoot,
|
||||
'Refactoring',uemRefactor);
|
||||
AParent:=SrcEditSubMenuRefactor;
|
||||
SrcEditMenuCompleteCode:=RegisterIDEMenuCommand(AParent,'CompleteCode',
|
||||
uemCompleteCode);
|
||||
@ -940,13 +956,13 @@ begin
|
||||
'RenameIdentifier',uemRenameIdentifier);
|
||||
|
||||
// register the Flags section
|
||||
AParent:=SourceEditorMenuRoot;
|
||||
SrcEditMenuSectionFlags:=RegisterIDEMenuSection(AParent,'Flags section');
|
||||
SrcEditMenuSectionFlags:=RegisterIDEMenuSection(SourceEditorMenuRoot,
|
||||
'Flags section');
|
||||
AParent:=SrcEditMenuSectionFlags;
|
||||
SrcEditMenuReadOnly:=RegisterIDEMenuCommand(AParent,'ReadOnly',uemReadOnly);
|
||||
SrcEditMenuReadOnly.ShowAlwaysCheckable:=true;
|
||||
SrcEditMenuShowLineNumbers:=RegisterIDEMenuCommand(AParent,'ShowLineNumbers',
|
||||
uemShowLineNumbers);
|
||||
SrcEditMenuShowLineNumbers:=RegisterIDEMenuCommand(AParent,
|
||||
'ShowLineNumbers',uemShowLineNumbers);
|
||||
SrcEditMenuShowLineNumbers.ShowAlwaysCheckable:=true;
|
||||
SrcEditMenuShowUnitInfo:=RegisterIDEMenuCommand(AParent,'ShowUnitInfo',
|
||||
uemShowUnitInfo);
|
||||
@ -1170,6 +1186,28 @@ Begin
|
||||
LazFindReplaceDialog.Options:=OldOptions;
|
||||
End;
|
||||
|
||||
procedure TSourceEditor.FindNextWordOccurrence(DirectionForward: boolean);
|
||||
var
|
||||
StartX, EndX: Integer;
|
||||
Word: String;
|
||||
Flags: TSynSearchOptions;
|
||||
LogCaret: TPoint;
|
||||
begin
|
||||
LogCaret:=EditorComponent.LogicalCaretXY;
|
||||
EditorComponent.GetWordBoundsAtRowCol(LogCaret,StartX,EndX);
|
||||
if EndX<=StartX then exit;
|
||||
Flags:=[ssoWholeWord];
|
||||
if DirectionForward then begin
|
||||
LogCaret.X:=EndX;
|
||||
end else begin
|
||||
LogCaret.X:=StartX;
|
||||
Include(Flags,ssoBackwards);
|
||||
end;
|
||||
EditorComponent.LogicalCaretXY:=LogCaret;
|
||||
EditorComponent.SearchReplace(EditorComponent.GetWordAtRowCol(LogCaret),
|
||||
'',Flags);
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.InitGotoDialog;
|
||||
begin
|
||||
if GotoDialog=nil then
|
||||
@ -1179,7 +1217,7 @@ end;
|
||||
function TSourceEditor.DoFindAndReplace: integer;
|
||||
var
|
||||
OldCaretXY: TPoint;
|
||||
AText,ACaption:AnsiString;
|
||||
AText, ACaption: String;
|
||||
NewTopLine: integer;
|
||||
begin
|
||||
Result:=0;
|
||||
@ -1415,6 +1453,12 @@ Begin
|
||||
ecGotoLineNumber :
|
||||
ShowGotoLineDialog;
|
||||
|
||||
ecFindNextWordOccurrence:
|
||||
FindNextWordOccurrence(true);
|
||||
|
||||
ecFindPrevWordOccurrence:
|
||||
FindNextWordOccurrence(false);
|
||||
|
||||
ecSelectionEnclose:
|
||||
EncloseSelection;
|
||||
|
||||
@ -3718,6 +3762,8 @@ begin
|
||||
|
||||
SrcEditMenuFindDeclaration.OnClick:=@FindDeclarationClicked;
|
||||
SrcEditMenuProcedureJump.OnClick:=@ProcedureJumpClicked;
|
||||
SrcEditMenuFindNextWordOccurrence.OnClick:=@FindNextWordOccurrenceClicked;
|
||||
SrcEditMenuFindPrevWordOccurrence.OnClick:=@FindPrevWordOccurrenceClicked;
|
||||
SrcEditMenuOpenFileAtCursor.OnClick:=@OpenAtCursorClicked;
|
||||
|
||||
SrcEditMenuClosePage.OnClick:=@CloseClicked;
|
||||
@ -4634,6 +4680,24 @@ begin
|
||||
ActSE.DoEditorExecuteCommand(ecFindProcedureDefinition);
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.FindNextWordOccurrenceClicked(Sender: TObject);
|
||||
var
|
||||
SrcEdit: TSourceEditor;
|
||||
begin
|
||||
SrcEdit := GetActiveSE;
|
||||
if SrcEdit<>nil then
|
||||
SrcEdit.FindNextWordOccurrence(true);
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.FindPrevWordOccurrenceClicked(Sender: TObject);
|
||||
var
|
||||
SrcEdit: TSourceEditor;
|
||||
begin
|
||||
SrcEdit := GetActiveSE;
|
||||
if SrcEdit<>nil then
|
||||
SrcEdit.FindNextWordOccurrence(false);
|
||||
end;
|
||||
|
||||
Procedure TSourceNotebook.CutClicked(Sender: TObject);
|
||||
var ActSE: TSourceEditor;
|
||||
begin
|
||||
|
@ -64,20 +64,22 @@ const
|
||||
ecFind = ecFirstLazarus + 1;
|
||||
ecFindAgain = ecFirstLazarus + 2;
|
||||
ecFindNext = ecFindAgain;
|
||||
ecReplace = ecFirstLazarus + 3;
|
||||
ecIncrementalFind = ecFirstLazarus + 4;
|
||||
ecFindProcedureDefinition = ecFirstLazarus + 5;
|
||||
ecFindProcedureMethod = ecFirstLazarus + 6;
|
||||
ecGotoLineNumber = ecFirstLazarus + 7;
|
||||
ecFindPrevious = ecFirstLazarus + 8;
|
||||
ecFindInFiles = ecFirstLazarus + 9;
|
||||
ecJumpBack = ecFirstLazarus + 10;
|
||||
ecJumpForward = ecFirstLazarus + 11;
|
||||
ecAddJumpPoint = ecFirstLazarus + 12;
|
||||
ecViewJumpHistory = ecFirstLazarus + 13;
|
||||
ecJumpToNextError = ecFirstLazarus + 14;
|
||||
ecJumpToPrevError = ecFirstLazarus + 15;
|
||||
ecProcedureList = ecFirstLazarus + 16;
|
||||
ecFindPrevious = ecFirstLazarus + 3;
|
||||
ecReplace = ecFirstLazarus + 4;
|
||||
ecIncrementalFind = ecFirstLazarus + 5;
|
||||
ecFindProcedureDefinition = ecFirstLazarus + 6;
|
||||
ecFindProcedureMethod = ecFirstLazarus + 7;
|
||||
ecGotoLineNumber = ecFirstLazarus + 8;
|
||||
ecFindNextWordOccurrence = ecFirstLazarus + 9;
|
||||
ecFindPrevWordOccurrence = ecFirstLazarus + 10;
|
||||
ecFindInFiles = ecFirstLazarus + 11;
|
||||
ecJumpBack = ecFirstLazarus + 12;
|
||||
ecJumpForward = ecFirstLazarus + 13;
|
||||
ecAddJumpPoint = ecFirstLazarus + 14;
|
||||
ecViewJumpHistory = ecFirstLazarus + 15;
|
||||
ecJumpToNextError = ecFirstLazarus + 16;
|
||||
ecJumpToPrevError = ecFirstLazarus + 17;
|
||||
ecProcedureList = ecFirstLazarus + 18;
|
||||
|
||||
// search code
|
||||
ecFindDeclaration = ecFirstLazarus + 20;
|
||||
|
@ -365,6 +365,8 @@ var
|
||||
SrcEditMenuSectionFirstDynamic: TIDEMenuSection;
|
||||
// Source Editor: First static section (e.g. Find Declaration)
|
||||
SrcEditMenuSectionFirstStatic: TIDEMenuSection;
|
||||
// Source Editor: Find sub menu section (e.g. Procedure Jump)
|
||||
SrcEditSubMenuFind: TIDEMenuSection;
|
||||
// Source Editor: Clipboard section (e.g. cut, copy, paste)
|
||||
SrcEditMenuSectionClipboard: TIDEMenuSection;
|
||||
// Source Editor: File Specific dynamic section
|
||||
|
Loading…
Reference in New Issue
Block a user