remove toggleSearch command

This commit is contained in:
Philipp Kühn
2019-06-04 22:20:27 +02:00
parent 17c1e8cf46
commit d759eb4d9d
3 changed files with 50 additions and 75 deletions

View File

@@ -15,10 +15,6 @@ export default class Search extends Extension {
return 'search'
}
init() {
this.editor.events.push('toggleSearch')
}
get defaultOptions() {
return {
autoSelectNext: true,
@@ -30,27 +26,12 @@ export default class Search extends Extension {
}
}
toggleSearch() {
return () => {
this.options.searching = !this.options.searching
this.editor.emit('toggleSearch', this.options.searching)
return true
}
}
keys() {
return {
'Mod-f': this.toggleSearch(),
}
}
commands() {
return {
find: attrs => this.find(attrs),
replace: attrs => this.replace(attrs),
replaceAll: attrs => this.replaceAll(attrs),
clearSearch: () => this.clear(),
toggleSearch: () => this.toggleSearch(),
}
}