Don't render cursor line decorations in mini editors

This commit is contained in:
Nathan Sobo
2017-03-15 20:46:46 -06:00
committed by Antonio Scandurra
parent 1427dbf540
commit 82feef9f68
2 changed files with 26 additions and 3 deletions

View File

@@ -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', () => {