mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Don't render cursor line decorations in mini editors
This commit is contained in:
committed by
Antonio Scandurra
parent
1427dbf540
commit
82feef9f68
@@ -251,6 +251,19 @@ describe('TextEditorComponent', () => {
|
||||
expect(component.refs.gutterContainer).toBeUndefined()
|
||||
expect(element.querySelector('gutter-container')).toBeNull()
|
||||
})
|
||||
|
||||
it('does not render line decorations for the cursor line', async () => {
|
||||
const {component, element, editor} = buildComponent({mini: true})
|
||||
expect(element.querySelector('.line').classList.contains('cursor-line')).toBe(false)
|
||||
|
||||
editor.update({mini: false})
|
||||
await component.getNextUpdatePromise()
|
||||
expect(element.querySelector('.line').classList.contains('cursor-line')).toBe(true)
|
||||
|
||||
editor.update({mini: true})
|
||||
await component.getNextUpdatePromise()
|
||||
expect(element.querySelector('.line').classList.contains('cursor-line')).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
describe('focus', () => {
|
||||
|
||||
Reference in New Issue
Block a user