1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-24 06:35:45 +01:00

* and # support

This commit is contained in:
Martin Stubenschrott
2007-09-06 17:39:21 +00:00
parent d9888288f3
commit 16bb541c98
6 changed files with 68 additions and 6 deletions

View File

@@ -108,10 +108,10 @@ function Search() //{{{
this.find = function(str, backwards)
{
var fastFind = getBrowser().fastFind;
str = processPattern(str);
fastFind.caseSensitive = case_sensitive;
found = fastFind.find(str, false) != Components.interfaces.nsITypeAheadFind.FIND_NOTFOUND;
return found;
}
@@ -158,15 +158,17 @@ function Search() //{{{
if (!vimperator.options["incsearch"])
return;
command = processPattern(command);
this.find(command, backwards);
}
// Called when the enter key is pressed to trigger a search
this.searchSubmitted = function(command)
// use forced_direction if you call this function directly
this.searchSubmitted = function(command, forced_backward)
{
if (typeof forced_backward === "boolean")
backwards = forced_backward;
this.clear();
command = processPattern(command);
this.find(command, backwards);
this.highlight(command);