[MonoDevelop] [PATCH] Type-Ahead Find

Zach Lute zach.lute at gmail.com
Sun Mar 11 22:21:21 EDT 2007

This is the first patch I've submitted that wasn't directly related to
an existing bug, so if there's a better method for submitting it,
please let me know and I'll apologize profusely and go do the right

Anyway, in IRC the other day, Miguel suggested that it would be nice
if MD supported Firefox-style type-ahead find.  I thought that sounded
like a great idea, so I went to work.  This patch adds:

* When "Enable type-ahead find" option is set, the Find command brings
up a simple toolbar below the editor instead of a separate dialog box.

* Typing in the find box will search the current file as you type.
Pressing up/down will go to the previous/next match in the file.

* This search will continuously wrap, which required a few
modifications to the search functions to ensure that it wouldn't halt
when it reached the point where the search originally started.

* If the option is disabled, or the user clicks the preferences button
on the toolbar, the current find dialog will come up instead.  Replace
will always use the existing system.

Things that this doesn't do that would be nice:

* I couldn't figure out how to intercept Ctrl-F/Ctrl-G/etc. once the
user was already in the Find entry box.  They never actually reach the
Gtk.Entry, so I couldn't emulate those functions or provide a keyboard
shortcut to bring up the advanced find from the toolbar.

* Currently, any options not exposed on the toolbar itself will use
the options set in the advanced box.  For example, if in the advanced
box the search is set to use Wildcards or Regexp, the toolbar will use
that option.  This seemed like a simple way to allow users to modify
the "default" behavior of that find box, but there might be a better

I'm still new to MD contribution, so please let me know if there's
anything I can do to make this more acceptable.  I'd love any feedback
at all.  I just added the feature and already I can't live without it,
so hopefully other people will like it as well. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: type-ahead-find.patch
Type: text/x-patch
Size: 64925 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20070311/fdad4145/attachment-0001.bin 

More information about the Monodevelop-list mailing list