mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Manage scroll sensitivity setting in TextEditorRegistry
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
63a730253b
commit
ab30ecf994
@@ -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'})
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user