improve(plugin): add editting cursor api & types

This commit is contained in:
charlie
2021-06-03 09:56:46 +08:00
parent 755afdb236
commit ba1cc8f752
4 changed files with 23 additions and 8 deletions

View File

@@ -234,8 +234,8 @@ export class LSPluginUser extends EventEmitter<LSPluginUserEvents> implements IL
this.caller.call('main-ui:style', style)
}
hideMainUI (): void {
const payload = { key: KEY_MAIN_UI, visible: false }
hideMainUI (opts?: { restoreEditingCursor: boolean }): void {
const payload = { key: KEY_MAIN_UI, visible: false, cursor: opts?.restoreEditingCursor }
this.caller.call('main-ui:visible', payload)
this.emit('ui:visible:changed', payload)
this._ui.set(payload.key, payload)