diff --git a/spec/text-editor-registry-spec.js b/spec/text-editor-registry-spec.js index 6d1aae2be..8ecb40c5b 100644 --- a/spec/text-editor-registry-spec.js +++ b/spec/text-editor-registry-spec.js @@ -427,6 +427,15 @@ describe('TextEditorRegistry', function () { expect(editor.getNonWordCharacters()).toBe('(){}[]') }) + it('sets the scroll sensitivity based on the config', function () { + atom.config.set('editor.scrollSensitivity', 60) + registry.maintainConfig(editor) + expect(editor.getScrollSensitivity()).toBe(60) + + atom.config.set('editor.scrollSensitivity', 70) + expect(editor.getScrollSensitivity()).toBe(70) + }) + it('gives the editor a scoped-settings delegate based on the config', function () { atom.config.set('editor.nonWordCharacters', '()') atom.config.set('editor.nonWordCharacters', '(){}', {scopeSelector: '.a.b .c.d'}) diff --git a/src/text-editor-registry.js b/src/text-editor-registry.js index e860ac9fd..825c4c58e 100644 --- a/src/text-editor-registry.js +++ b/src/text-editor-registry.js @@ -19,7 +19,8 @@ const EDITOR_SETTER_NAMES_BY_SETTING_KEY = [ ['editor.autoIndentOnPaste', 'setAutoIndentOnPaste'], ['editor.scrollPastEnd', 'setScrollPastEnd'], ['editor.undoGroupingInterval', 'setUndoGroupingInterval'], - ['editor.nonWordCharacters', 'setNonWordCharacters'] + ['editor.nonWordCharacters', 'setNonWordCharacters'], + ['editor.scrollSensitivity', 'setScrollSensitivity'] ] const GRAMMAR_SELECTION_RANGE = Range(Point.ZERO, Point(10, 0)).freeze()