diff --git a/chrome/content/vimperator/find.js b/chrome/content/vimperator/find.js index 530c1273..c224a4e2 100644 --- a/chrome/content/vimperator/find.js +++ b/chrome/content/vimperator/find.js @@ -111,7 +111,10 @@ function Search() //{{{ // Called when the user types a key in the search dialog. Triggers a find attempt this.searchKeyPressed = function(command) { - // TODO: check for 'incsearch' + if (!vimperator.options['incsearch']) + return; + + // FIXME: isn't the global already set here? -- djk var backward = vimperator.hasMode(vimperator.modes.SEARCH_BACKWARD); this.find(command, backward); } diff --git a/chrome/content/vimperator/options.js b/chrome/content/vimperator/options.js index 5cbdb4fa..66fcd30a 100644 --- a/chrome/content/vimperator/options.js +++ b/chrome/content/vimperator/options.js @@ -432,6 +432,12 @@ function Options() //{{{ default_value: false } )); + addOption(new Option(["incsearch", "is"], "boolean", + { + short_help: "Show where the search pattern matches as it is typed", + default_value: false + } + )); addOption(new Option(["maxhints", "mh"], "number", { short_help: "Maximum number of simultaneously shown hints",