diff --git a/ide/searchresultview.pp b/ide/searchresultview.pp index 9f3d7ab36d..6cce0f32ca 100644 --- a/ide/searchresultview.pp +++ b/ide/searchresultview.pp @@ -706,7 +706,6 @@ begin exit; end; end; - SearchPos:= TLazSearchMatchPos.Create; SearchPos.MatchStart:=MatchStart; SearchPos.MatchLen:=MatchLen; @@ -771,28 +770,27 @@ begin end; procedure TSearchResultsView.Parse_Search_Phrases(var slPhrases: TStrings); -var i, iLength: Integer; - sPhrases, sPhrase: string; +var + i, iLength: Integer; + sPhrases, sPhrase: string; begin - //Parse Phrases - sPhrases := SearchInListEdit.Text; - iLength := Length(sPhrases); - sPhrase := ''; - for i:=1 to iLength do + //Parse Phrases + sPhrases := SearchInListEdit.Text; + iLength := Length(sPhrases); + sPhrase := ''; + for i:=1 to iLength do begin - if ((sPhrases[i] = ' ') or (sPhrases[i] = ',') or (i = iLength)) then + if ((sPhrases[i] = ' ') or (sPhrases[i] = ',') or (i = iLength)) then begin - if not ((sPhrases[i] = ' ') or (sPhrases[i] = ',')) then + if not ((sPhrases[i] = ' ') or (sPhrases[i] = ',')) then + sPhrase := sPhrase + sPhrases[i]; + if (sPhrase > ' ') then + slPhrases.Add(UpperCase(sPhrase)); //End of phrase, add to phrase list + sPhrase := '';//Reset sPhrase + end + else if (sPhrases[i] > ' ') then sPhrase := sPhrase + sPhrases[i]; - if (sPhrase > ' ') then - slPhrases.Add(UpperCase(sPhrase));//End of phrase, add to phrase list - sPhrase := '';//Reset sPhrase - end else - begin - if (sPhrases[i] > ' ') then - sPhrase := sPhrase + sPhrases[i]; - end;//End if ((sPhrases[i] = ' ') or (sPhrases[i] = ',')) - end;//End for-loop i + end; //End for-loop i end; procedure TSearchResultsView.ResultsNoteBookChanging(Sender: TObject; @@ -1347,7 +1345,7 @@ begin end; ChildNode := Items.AddChild(Node, Line); - Node.Expanded:=true; + Node.Expanded := true; ChildNode.Data := MatchPos; end; diff --git a/ide/toolbarconfig.pas b/ide/toolbarconfig.pas index 8babd8db34..737c18918b 100644 --- a/ide/toolbarconfig.pas +++ b/ide/toolbarconfig.pas @@ -444,7 +444,7 @@ begin end; procedure TToolBarConfig.AddToolBarItem(CmdItem: TIDEButtonCommand); -Var +var Node: TTreeNode; lvItem: TListItem; begin diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index a682ebfa0e..dca7e86f9b 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -1166,7 +1166,7 @@ type Partial, Inclusive, Wrap: Boolean; PartStart: Boolean = True): TListItem; function FindData(const AData: Pointer): TListItem; overload; - function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem; overload; + function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem; overload; function GetEnumerator: TListItemsEnumerator; function IndexOf(const AItem: TListItem): Integer; function Insert(const AIndex: Integer) : TListItem; @@ -1618,7 +1618,7 @@ type procedure Repaint; override; function FindCaption(StartIndex: Integer; Value: string; Partial, Inclusive, Wrap: Boolean; PartStart: Boolean = True): TListItem; - function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem; + function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem; function GetHitTestInfoAt(X, Y: Integer): THitTests; function GetItemAt(x,y: integer): TListItem;