diff --git a/spec/text-editor-component-spec.js b/spec/text-editor-component-spec.js index 66274a99a..cbc65b188 100644 --- a/spec/text-editor-component-spec.js +++ b/spec/text-editor-component-spec.js @@ -2085,6 +2085,22 @@ describe('TextEditorComponent', () => { const bLabels = Array.from(bNumbers, e => e.textContent) expect(bLabels).toEqual(['b - 0', 'b - 1', 'b - 2', 'b - 3', 'b - 4', 'b - 5']) }) + + it("updates the editor's soft wrap width when a custom gutter's measurement is available", () => { + const {component, element, editor} = buildComponent({ + lineNumberGutterVisible: false, + width: 400, + softWrapped: true, + attach: false, + }) + const gutter = editor.addGutter({name: 'a', priority: 10}) + gutter.getElement().style.width = '100px' + + jasmine.attachToDOM(element) + + expect(component.getGutterContainerWidth()).toBe(100) + expect(editor.getSoftWrapColumn()).toBe(39); + }) }) describe('block decorations', () => {