forked from brotherbard/gitx
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously searching would filter the commits in the commit tableview to only show the commits that matched the search. However the context of where those commits exist in the history is lost. With this patch all the commits are shown but the commits that match the search are highlighted with a light blue background. In addition there is a forward/back button to step through the matches. A new search controller: - keeps track of the matching results - finds the next or previous result - displays the number of matches found or "Not found" - shows/hides the # of matches text and the next/last stepper button - shows a small bezel style window with a rewind icon indicating that the selection has cycled (pressing next when at the last match or previous when at the first) - sets up the search predicate which covers Subject, Author and SHA (previously this was three different searches) - stores search results in an NSIndexSet to make finding if a row is in the set faster (needed at drawing time) Highlighting of search result rows is done in PBCommitList -drawRow:clipRect: PBGitTextFieldCell is a subclass of NSTextFieldCell that disables the cell's selection highlighting. Supporting Find Next and Find Previous (cmd-g and cmd-shift-g) menu commands required changing the action method of the menu items because NSTextFields (seem to) actively disable items in the Find menu. rewindImage.pdf created by Nathan Kinsinger
- Loading branch information
1 parent
80596ad
commit 4fad6b6
Showing
13 changed files
with
1,057 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.