make cursor position controlled property of state

This commit is contained in:
Dmitry Vasilev
2022-12-03 03:17:01 +08:00
parent e235704455
commit e3a742ae77
6 changed files with 150 additions and 180 deletions

View File

@@ -240,11 +240,7 @@ export class UI {
change_entrypoint(e) {
const file = e.target.value
const index = this.editor.get_caret_position(file)
// if index is null, session was not created, and index after session
// creation will be 0
?? 0
exec('change_entrypoint', file, index)
exec('change_entrypoint', file)
this.editor.focus()
}