Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit c4190aa

Browse files
committed
Changes after Review
1 parent 2ddd62c commit c4190aa

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

src/editor/Editor.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,6 +1833,7 @@ define(function (require, exports, module) {
18331833

18341834
if (oldValue !== newValue) {
18351835
this._currentOptions[prefName] = newValue;
1836+
var useTabChar = this._currentOptions[USE_TAB_CHAR];
18361837

18371838
if (prefName === USE_TAB_CHAR) {
18381839
this._codeMirror.setOption(cmOptions[prefName], newValue);
@@ -1842,19 +1843,14 @@ define(function (require, exports, module) {
18421843
);
18431844
} else if (prefName === STYLE_ACTIVE_LINE) {
18441845
this._updateStyleActiveLine();
1845-
} else {
1846+
} else if (prefName === SCROLL_PAST_END && this._visibleRange) {
1847+
// Do not apply this option to inline editors
1848+
return;
1849+
} else if ((useTabChar && prefName === SPACE_UNITS) || (!useTabChar && prefName === TAB_SIZE)) {
18461850
// Set the CodeMirror option as long as it's not a change
18471851
// that is in conflict with the useTabChar setting.
1848-
var useTabChar = this._currentOptions[USE_TAB_CHAR];
1849-
if ((useTabChar && prefName === SPACE_UNITS) ||
1850-
(!useTabChar && prefName === TAB_SIZE)) {
1851-
return;
1852-
}
1853-
// Do not apply this option to inline editors
1854-
if (prefName === SCROLL_PAST_END && this._visibleRange) {
1855-
return;
1856-
}
1857-
1852+
return;
1853+
} else {
18581854
this._codeMirror.setOption(cmOptions[prefName], newValue);
18591855
}
18601856

0 commit comments

Comments
 (0)