mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
make cursor position controlled property of state
This commit is contained in:
@@ -416,9 +416,9 @@ export class Editor {
|
||||
? this.ace_editor.getSession()
|
||||
: this.get_session(file)
|
||||
|
||||
// Session was not created for file
|
||||
if(session == null) {
|
||||
return null
|
||||
// Session was not created for file
|
||||
throw new Error('illegal state')
|
||||
}
|
||||
|
||||
return session.doc.positionToIndex(session.selection.getCursor())
|
||||
|
||||
Reference in New Issue
Block a user