summaryrefslogtreecommitdiff
path: root/lib/search.tcl
AgeCommit message (Collapse)AuthorFilesLines
2011-10-21git-gui: use a tristate to control the case mode in the searchbarLibravatar Bert Wesarg1-7/+17
The config is now called gui.search.case and can have the three values: no/yes/smart. yes is the default. It also resets the case detection in smart mode, when the entry field was cleared by the use. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-19git-gui: enable the smart case sensitive search only if gui.search.smartcase ↵Libravatar Pat Thoyts1-3/+7
is true Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-19git-gui: catch invalid or complete regular expressions and treat as no match.Libravatar Pat Thoyts1-7/+9
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-19git-gui: theme the search and line-number entry fields on blame screenLibravatar Pat Thoyts1-3/+5
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-18git-gui: add search history to searchbarLibravatar Bert Wesarg1-0/+60
Use the up/down keys to browse the history. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-18git-gui: add regexp search mode to the searchbarLibravatar Bert Wesarg1-1/+11
It's off by default, but can be enabled via the config gui.search.regexp. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-18git-gui: add smart case search mode in searchbarLibravatar Bert Wesarg1-1/+12
Setting config gui.search.smartcase to true, the search mode in the searchbar (from the blame view) is by default case-insensitive. But entering an upper case letter into the search field activates the case- sensitive search mode. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-07-19git-gui: Add keyboard shortcuts for search and goto commands in blame view.Libravatar David Fries1-1/+3
Use forward-slash or Control-S to bring up the search dialog. In the blame view, Enter or 'n' jump to the next selected region while Shift-Enter or Shift-n will jump to the previous selected region. Within the search control, hitting Enter will now jump to the next matching region. Signed-off-by: David Fries <David@Fries.net> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-01-27git-gui: use themed tk widgets with Tk 8.5Libravatar Pat Thoyts1-5/+6
This patch enables the use of themed Tk widgets with Tk 8.5 and above. These make a significant difference on Windows in making the application appear native. On Windows and MacOSX ttk defaults to the native look as much as possible. On X11 the user may select a theme using the TkTheme XRDB resource class by adding an line to the .Xresources file. The set of installed theme names is available using the Tk command 'ttk::themes'. The default on X11 is similar to the current un-themed style - a kind of thin bordered motif look. A new git config variable 'gui.usettk' may be set to disable this if the user prefers the classic Tk look. Using Tk 8.4 will also avoid the use of themed widgets as these are only available since 8.5. Some support is included for Tk 8.6 features (themed spinbox and native font chooser for MacOSX and Windows). Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-16git-gui: Fix the search bar destruction handler.Libravatar Alexander Gavrilov1-1/+1
Since delete_this is an ordinary function, it should not be passed to cb; otherwise it produces errors when blame windows are closed. Unfortunately, it is not noticeable when blame is shown in the master window, so I missed this bug. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-11git-gui: Fix focus transition in the blame viewer.Libravatar Alexander Gavrilov1-3/+11
Now that the blame viewer has a search panel, it should be taken into account by the focus transition code. Otherwise showing a commit tip (by accidentally moving the mouse to the text frame) causes the focus to transfer away from the search field. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-10-10git-gui: Add a search command to the blame viewer.Libravatar Alexander Gavrilov1-0/+190
One of the largest deficiencies in the blame viewer at the moment is the impossibility to search for a text string. This commit fixes it by adding a Firefox-like search panel to the viewer. The panel can be shown by pressing F7 or clicking a menu entry, and is hidden by pressing Esc. Find Next is available through the F3 key. Implementation is based on the gitk code, but heavily refactored. It now also supports case-insensitive searches, and uses the text box background color to signal success or failure of the search. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>