diff --git a/spec/text-editor-spec.js b/spec/text-editor-spec.js index 4a4723da1..c49e15a25 100644 --- a/spec/text-editor-spec.js +++ b/spec/text-editor-spec.js @@ -6716,7 +6716,7 @@ describe('TextEditor', () => { const gutter = editor.addGutter(options) expect(editor.getGutters().length).toBe(2) expect(editor.getGutters()[1]).toBe(gutter) - expect(gutter.kind).toBe('decorated') + expect(gutter.type).toBe('decorated') }) it('can add a custom line-number gutter', () => { @@ -6724,12 +6724,12 @@ describe('TextEditor', () => { const options = { name: 'another-gutter', priority: 2, - kind: 'line-number' + type: 'line-number' } const gutter = editor.addGutter(options) expect(editor.getGutters().length).toBe(2) expect(editor.getGutters()[1]).toBe(gutter) - expect(gutter.kind).toBe('line-number') + expect(gutter.type).toBe('line-number') }) it("does not allow a custom gutter with the 'line-number' name.", () => expect(editor.addGutter.bind(editor, {name: 'line-number'})).toThrow()) diff --git a/src/gutter-container.js b/src/gutter-container.js index 220d9f017..cd0c796b2 100644 --- a/src/gutter-container.js +++ b/src/gutter-container.js @@ -97,7 +97,7 @@ module.exports = class GutterContainer { // The public interface is Gutter::decorateMarker or TextEditor::decorateMarker. addGutterDecoration (gutter, marker, options) { - if (gutter.kind === 'line-number') { + if (gutter.type === 'line-number') { options.type = 'line-number' } else { options.type = 'gutter' diff --git a/src/gutter.js b/src/gutter.js index 6835e698a..e53d700b7 100644 --- a/src/gutter.js +++ b/src/gutter.js @@ -11,7 +11,7 @@ module.exports = class Gutter { this.name = options && options.name this.priority = (options && options.priority != null) ? options.priority : DefaultPriority this.visible = (options && options.visible != null) ? options.visible : true - this.kind = (options && options.kind != null) ? options.kind : 'decorated' + this.type = (options && options.type != null) ? options.type : 'decorated' this.labelFn = options && options.labelFn this.emitter = new Emitter() diff --git a/src/text-editor-component.js b/src/text-editor-component.js index 93c71f253..0970eedae 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -3099,7 +3099,7 @@ class GutterContainerComponent { }, $.div({style: innerStyle}, guttersToRender.map((gutter) => { - if (gutter.kind === 'line-number') { + if (gutter.type === 'line-number') { return this.renderLineNumberGutter(gutter) } else { return $(CustomGutterComponent, { diff --git a/src/text-editor.js b/src/text-editor.js index 2c44b2ca7..6f77813aa 100644 --- a/src/text-editor.js +++ b/src/text-editor.js @@ -258,7 +258,7 @@ class TextEditor { this.gutterContainer = new GutterContainer(this) this.lineNumberGutter = this.gutterContainer.addGutter({ name: 'line-number', - kind: 'line-number', + type: 'line-number', priority: 0, visible: params.lineNumberGutterVisible })