mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Fix show/hide line numbers in editor
This commit is contained in:
@@ -425,6 +425,19 @@ describe('TextEditorRegistry', function () {
|
||||
expect(editor.hasAtomicSoftTabs()).toBe(true)
|
||||
})
|
||||
|
||||
it('enables or disables line numbers based on the config', async function () {
|
||||
editor.update({showLineNumbers: true})
|
||||
expect(editor.showLineNumbers).toBe(true)
|
||||
|
||||
atom.config.set('editor.showLineNumbers', false)
|
||||
registry.maintainConfig(editor)
|
||||
await initialPackageActivation
|
||||
expect(editor.showLineNumbers).toBe(false)
|
||||
|
||||
atom.config.set('editor.showLineNumbers', true)
|
||||
expect(editor.showLineNumbers).toBe(true)
|
||||
})
|
||||
|
||||
it('sets the invisibles based on the config', async function () {
|
||||
const invisibles1 = {'tab': 'a', 'cr': false, eol: false, space: false}
|
||||
const invisibles2 = {'tab': 'b', 'cr': false, eol: false, space: false}
|
||||
|
||||
@@ -12,6 +12,7 @@ const EDITOR_PARAMS_BY_SETTING_KEY = [
|
||||
['editor.tabLength', 'tabLength'],
|
||||
['editor.invisibles', 'invisibles'],
|
||||
['editor.showIndentGuide', 'showIndentGuide'],
|
||||
['editor.showLineNumbers', 'showLineNumbers'],
|
||||
['editor.softWrap', 'softWrapped'],
|
||||
['editor.softWrapHangingIndent', 'softWrapHangingIndentLength'],
|
||||
['editor.softWrapAtPreferredLineLength', 'softWrapAtPreferredLineLength'],
|
||||
|
||||
Reference in New Issue
Block a user