improve(plguin): apis about insertion related with cursor state & more types

This commit is contained in:
charlie
2021-06-01 22:33:41 +08:00
parent 0f39c9631e
commit c9f68296b4
5 changed files with 45 additions and 13 deletions

View File

@@ -39,7 +39,11 @@ const editor: Partial<IEditorProxy> = {
debug('Register slash command #', this.baseInfo.id, tag, actions)
if (typeof actions === 'function') {
actions = [['editor/clear-current-slash'], ['editor/hook', actions]]
actions = [
['editor/clear-current-slash', false],
['editor/restore-saved-cursor'],
['editor/hook', actions]
]
}
actions = actions.map((it) => {