Skip to content

Commit

Permalink
Issue #69 by P-Storm - Wrap around during search
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot committed Jul 16, 2015
2 parents 3781436 + d6ebe2a commit 00e12a0
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 131 deletions.
2 changes: 1 addition & 1 deletion SnakeTail/EventLogForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ ListViewItem GetNextEntry(int previousRecordId, bool searchForward, int startInd
return null; // Should never come here
}

public bool SearchForText(string searchText, bool matchCase, bool searchForward, bool lineHighlights)
public bool SearchForText(string searchText, bool matchCase, bool searchForward, bool lineHighlights, bool wrapAround)
{
int listCount = -1;

Expand Down
2 changes: 1 addition & 1 deletion SnakeTail/ITailForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface ITailForm
{
Form TailWindow { get; }

bool SearchForText(string searchText, bool matchCase, bool searchForward, bool keywordHighlights);
bool SearchForText(string searchText, bool matchCase, bool searchForward, bool keywordHighlights, bool wrapAround);

void SaveConfig(TailFileConfig config);

Expand Down
26 changes: 21 additions & 5 deletions SnakeTail/SearchForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion SnakeTail/SearchForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void SearchAgain(ITailForm activeTailForm, bool searchForward, bool keywo
{
using (new HourGlass(activeTailForm.TailWindow))
{
found = ActiveTailForm.SearchForText(_searchTextBox.Text, _matchCaseCheckBox.Checked, searchForward, keywordHighlights);
found = ActiveTailForm.SearchForText(_searchTextBox.Text, _matchCaseCheckBox.Checked, searchForward, keywordHighlights, keywordHighlights ? false : _wrapArroundcheckBox.Checked);
}
}
if (!found)
Expand Down
Loading

0 comments on commit 00e12a0

Please sign in to comment.