Skip to content

Commit

Permalink
New version 1.03b, fixed a bug on opening an explorer on selected Sea…
Browse files Browse the repository at this point in the history
…rch Memo
  • Loading branch information
meboev committed Jul 13, 2017
1 parent 49de1fb commit 2e68a12
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
Binary file modified AboutForms.dfm
Binary file not shown.
Binary file modified OpenFileInFolders.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NppOpenFileInFolders

Notepad++ Plugin written in Delphi 7 - Open File In Folders
version 1.03a
version 1.03b

### Installation

Expand Down
Binary file modified Screenshot3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions ShowForms.pas
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ procedure TShowForms.SearchMemoKeyDown(Sender: TObject; var Key: Word;
filename: nppString;
i, topSelected, newTopSelected, bottomSelected, newBottomSelected: Integer;
shouldClose, shouldGoToEnd: Boolean;
selectedItems: TStringList;
SearchText: String;
begin
SearchText := SearchMemo.Text;

topSelected := -1;
newTopSelected := -1;
bottomSelected := -1;
Expand Down Expand Up @@ -363,10 +367,13 @@ procedure TShowForms.SearchMemoKeyDown(Sender: TObject; var Key: Word;
shouldGoToEnd := false;
if topSelected <> -1 then
begin
selectedItems := TStringList.Create;
for i := 0 to SearchListBox.Count - 1 do
if SearchListBox.Selected[i] then
if SearchListBox.Selected[i] then selectedItems.Add( SearchListBox.Items[ i ] );

for i := 0 to selectedItems.Count - 1 do
begin
filename := SearchListBox.Items[ i ];
filename := selectedItems[ i ];
if (Shift = [ssCtrl]) then
begin
if not OpenFolderAndSelectFile(filename) then begin
Expand All @@ -379,6 +386,9 @@ procedure TShowForms.SearchMemoKeyDown(Sender: TObject; var Key: Word;
shouldClose := true;
end;
end;
selectedItems.Free;
SearchMemo.Text := SearchText;

if shouldClose then Close;
if shouldGoToEnd then SearchMemo.SelStart := Length(SearchMemo.Text);
end;
Expand Down

0 comments on commit 2e68a12

Please sign in to comment.