fix scrolltop being changed after moving the tab between panes

pull/483/merge
nightwing 2018-03-05 20:35:15 +04:00
rodzic 8ad52f1756
commit 8605bafc84
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -30,6 +30,7 @@ define(function(require, module, exports) {
// Old Editor
var lastEditor = doc.editor;
if (lastEditor && lastEditor != plugin) {
doc.getState();
lastEditor.unloadDocument(doc, {
toEditor: plugin,
fromEditor: lastEditor

Wyświetl plik

@ -49,13 +49,13 @@ define(function(require, exports, module) {
// Value
doc.on("getValue", function get(e) {
return currentDocument == doc
return currentDocument == doc && editor
? editor.value
: e.value;
}, session);
doc.on("setValue", function set(e) {
if (currentDocument == doc)
if (currentDocument == doc && editor)
editor.value = e.value || "";
}, session);