add getCursorPosition fn to editor

pull/1/head
yann300 7 years ago
parent 13d78ece5b
commit 94a25953fa
  1. 4
      src/app/editor/editor.js

@ -126,6 +126,10 @@ function Editor (opts = {}) {
return currentSession
}
this.getCursorPosition = function () {
return editor.session.doc.positionToIndex(editor.getCursorPosition(), 0)
}
this.discard = function (path) {
if (currentSession !== path) {
delete sessions[path]

Loading…
Cancel
Save