Commit 0b059a45 authored by Jacob Schatz's avatar Jacob Schatz Committed by Eric Eastwood

Move setposition.

parent 408771b8
...@@ -52,6 +52,8 @@ const RepoEditor = { ...@@ -52,6 +52,8 @@ const RepoEditor = {
Helper.monacoInstance.onKeyUp(this.onMonacoEditorKeysPressed.bind(this)); Helper.monacoInstance.onKeyUp(this.onMonacoEditorKeysPressed.bind(this));
}, },
onMonacoEditorKeysPressed() { onMonacoEditorKeysPressed() {
Store.setActiveFileContents(Helper.monacoInstance.getValue()); Store.setActiveFileContents(Helper.monacoInstance.getValue());
}, },
...@@ -61,18 +63,16 @@ const RepoEditor = { ...@@ -61,18 +63,16 @@ const RepoEditor = {
if (e.target.element.classList.contains('line-numbers')) { if (e.target.element.classList.contains('line-numbers')) {
location.hash = `L${lineNumber}`; location.hash = `L${lineNumber}`;
Store.activeLine = lineNumber; Store.activeLine = lineNumber;
Helper.monacoInstance.setPosition({
lineNumber: this.activeLine,
column: 1,
});
} }
}, },
}, },
watch: { watch: {
activeLine() {
Helper.monacoInstance.setPosition({
lineNumber: this.activeLine,
column: 1,
});
},
activeFileLabel() { activeFileLabel() {
this.showHide(); this.showHide();
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment