mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
When decorating a MarkerLayer, get its corresponding DisplayMarkerLayer
This fixes 'folded' line number decorations.
This commit is contained in:
parent
a2f75c8337
commit
68659d9698
@ -224,6 +224,13 @@ describe('TextEditorComponent', () => {
|
||||
expect(scroller.clientWidth).toBe(scroller.scrollWidth)
|
||||
})
|
||||
|
||||
it('decorates the line numbers of folded lines', async () => {
|
||||
const {component, element, editor} = buildComponent()
|
||||
editor.foldBufferRow(1)
|
||||
await component.getNextUpdatePromise()
|
||||
expect(lineNumberNodeForScreenRow(component, 1).classList.contains('folded')).toBe(true)
|
||||
})
|
||||
|
||||
describe('focus', () => {
|
||||
it('focuses the hidden input element and adds the is-focused class when focused', async () => {
|
||||
assertDocumentFocused()
|
||||
|
@ -200,6 +200,7 @@ class DecorationManager {
|
||||
if (markerLayer.isDestroyed()) {
|
||||
throw new Error('Cannot decorate a destroyed marker layer')
|
||||
}
|
||||
markerLayer = this.displayLayer.getMarkerLayer(markerLayer.id)
|
||||
const decoration = new LayerDecoration(markerLayer, this, decorationParams)
|
||||
let layerDecorations = this.layerDecorationsByMarkerLayer.get(markerLayer)
|
||||
if (layerDecorations == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user