[incremental search] cleanup && fixing module dependencies
This commit is contained in:
parent
5cc2c50ebb
commit
e5fc2ea853
2 changed files with 24 additions and 22 deletions
|
|
@ -210,30 +210,32 @@ function patchHighlightMarkerStyling(options) {
|
||||||
|
|
||||||
|
|
||||||
// support for default keyboard handler
|
// support for default keyboard handler
|
||||||
var CommandManager = require("./commands/command_manager").CommandManager;
|
require(["./commands/command_manager"], function(cmdMgr) {
|
||||||
(function() {
|
(function() {
|
||||||
this.setupIncrementalSearch = function(editor, val) {
|
this.setupIncrementalSearch = function(editor, val) {
|
||||||
if (this.usesIncrementalSearch == val) return;
|
if (this.usesIncrementalSearch == val) return;
|
||||||
this.usesIncrementalSearch = val;
|
this.usesIncrementalSearch = val;
|
||||||
var iSearchCommands = iSearchCommandModule.iSearchStartCommands,
|
var iSearchCommands = iSearchCommandModule.iSearchStartCommands,
|
||||||
method = val ? 'addCommands' : 'removeCommands';
|
method = val ? 'addCommands' : 'removeCommands';
|
||||||
this[method](iSearchCommands);
|
this[method](iSearchCommands);
|
||||||
};
|
};
|
||||||
}).call(CommandManager.prototype);
|
}).call(cmdMgr.CommandManager.prototype);
|
||||||
|
});
|
||||||
|
|
||||||
// support for emacskeyboard handler
|
// support for emacskeyboard handler
|
||||||
var emacs = require("./keyboard/emacs");
|
require(["./keyboard/emacs"], function(emacs) {
|
||||||
emacs.handler.setupIncrementalSearch = function(editor, val) {
|
emacs.handler.setupIncrementalSearch = function(editor, val) {
|
||||||
if (this.usesIncrementalSearch == val) return;
|
if (this.usesIncrementalSearch == val) return;
|
||||||
this.usesIncrementalSearch = val;
|
this.usesIncrementalSearch = val;
|
||||||
if (val) {
|
if (val) {
|
||||||
this.bindKey('C-s', 'iSearch');
|
this.bindKey('C-s', 'iSearch');
|
||||||
this.bindKey('C-r', 'iSearchBackwards');
|
this.bindKey('C-r', 'iSearchBackwards');
|
||||||
} else {
|
} else {
|
||||||
this.bindKey('C-s', "findnext");
|
this.bindKey('C-s', "findnext");
|
||||||
this.bindKey('C-r', "findprevious");
|
this.bindKey('C-r', "findprevious");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
// incremental search config option
|
// incremental search config option
|
||||||
var Editor = require("./editor").Editor;
|
var Editor = require("./editor").Editor;
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ var testNames = [
|
||||||
"ace/editor_navigation_test",
|
"ace/editor_navigation_test",
|
||||||
"ace/editor_text_edit_test",
|
"ace/editor_text_edit_test",
|
||||||
"ace/ext/static_highlight_test",
|
"ace/ext/static_highlight_test",
|
||||||
|
"ace/incremental_search_test",
|
||||||
"ace/keyboard/emacs_test",
|
"ace/keyboard/emacs_test",
|
||||||
"ace/keyboard/keybinding_test",
|
"ace/keyboard/keybinding_test",
|
||||||
"ace/layer/text_test",
|
"ace/layer/text_test",
|
||||||
|
|
@ -45,7 +46,6 @@ var testNames = [
|
||||||
"ace/range_test",
|
"ace/range_test",
|
||||||
"ace/range_list_test",
|
"ace/range_list_test",
|
||||||
"ace/search_test",
|
"ace/search_test",
|
||||||
"ace/incremental_search_test",
|
|
||||||
"ace/selection_test",
|
"ace/selection_test",
|
||||||
"ace/token_iterator_test",
|
"ace/token_iterator_test",
|
||||||
"ace/virtual_renderer_test"
|
"ace/virtual_renderer_test"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue