remove async commands (WIP)

This commit is contained in:
Philipp Kühn
2020-09-11 17:30:55 +02:00
parent 5d3a2e900b
commit 6a04f9746d
5 changed files with 59 additions and 28 deletions

View File

@@ -94,7 +94,18 @@ export default class ExtensionManager {
return collect(this.extensions)
.map(extension => extension.config.keys)
.filter(keys => keys)
.map(keys => keymap(keys))
.map(keys => {
const values = Object.entries(keys).map(([key, action]) => {
return [key, () => {
this.editor.lastCommandValue = undefined
// @ts-ignore
const bla = action().lastCommandValue
// console.log({bla})
return bla
}]
})
return keymap(Object.fromEntries(values))
})
.toArray()
}