From 21580aa170a9d722d9bf020c23b5fac13567dde9 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Sun, 24 May 2020 15:35:24 -0500 Subject: [PATCH] fix multi cursor correct setting --- spec/text-editor-component-spec.js | 14 +++++++------- src/text-editor-component.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/text-editor-component-spec.js b/spec/text-editor-component-spec.js index cee4eda1e..d6769dd59 100644 --- a/spec/text-editor-component-spec.js +++ b/spec/text-editor-component-spec.js @@ -4221,7 +4221,7 @@ describe('TextEditorComponent', () => { }); it('adds or removes cursors when holding cmd or ctrl when single-clicking', () => { - atom.config.set('core.editor.multiCursorOnClick', true); + atom.config.set('editor.multiCursorOnClick', true); const { component, editor } = buildComponent({ platform: 'darwin' }); expect(editor.getCursorScreenPositions()).toEqual([[0, 0]]); @@ -4302,7 +4302,7 @@ describe('TextEditorComponent', () => { }); it('adds word selections when holding cmd or ctrl when double-clicking', () => { - atom.config.set('core.editor.multiCursorOnClick', true); + atom.config.set('editor.multiCursorOnClick', true); const { component, editor } = buildComponent(); editor.addCursorAtScreenPosition([1, 16], { autoscroll: false }); expect(editor.getCursorScreenPositions()).toEqual([[0, 0], [1, 16]]); @@ -4329,7 +4329,7 @@ describe('TextEditorComponent', () => { }); it('adds line selections when holding cmd or ctrl when triple-clicking', () => { - atom.config.set('core.editor.multiCursorOnClick', true); + atom.config.set('editor.multiCursorOnClick', true); const { component, editor } = buildComponent(); editor.addCursorAtScreenPosition([1, 16], { autoscroll: false }); expect(editor.getCursorScreenPositions()).toEqual([[0, 0], [1, 16]]); @@ -4369,7 +4369,7 @@ describe('TextEditorComponent', () => { }); it('does not add cursors when holding cmd or ctrl when single-clicking', () => { - atom.config.set('core.editor.multiCursorOnClick', false); + atom.config.set('editor.multiCursorOnClick', false); const { component, editor } = buildComponent({ platform: 'darwin' }); expect(editor.getCursorScreenPositions()).toEqual([[0, 0]]); @@ -4411,7 +4411,7 @@ describe('TextEditorComponent', () => { }); it('does not add word selections when holding cmd or ctrl when double-clicking', () => { - atom.config.set('core.editor.multiCursorOnClick', false); + atom.config.set('editor.multiCursorOnClick', false); const { component, editor } = buildComponent(); component.didMouseDownOnContent( @@ -4435,7 +4435,7 @@ describe('TextEditorComponent', () => { }); it('does not add line selections when holding cmd or ctrl when triple-clicking', () => { - atom.config.set('core.editor.multiCursorOnClick', false); + atom.config.set('editor.multiCursorOnClick', false); const { component, editor } = buildComponent(); const { clientX, clientY } = clientPositionForCharacter( @@ -4557,7 +4557,7 @@ describe('TextEditorComponent', () => { }); it('expands the last selection on drag', () => { - atom.config.set('core.editor.multiCursorOnClick', true); + atom.config.set('editor.multiCursorOnClick', true); const { component, editor } = buildComponent(); spyOn(component, 'handleMouseDragUntilMouseUp'); diff --git a/src/text-editor-component.js b/src/text-editor-component.js index fff4fd224..6e92ace24 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -1994,7 +1994,7 @@ module.exports = class TextEditorComponent { return; } - const allowMultiCursor = atom.config.get('core.editor.multiCursorOnClick'); + const allowMultiCursor = atom.config.get('editor.multiCursorOnClick'); const addOrRemoveSelection = allowMultiCursor && (metaKey || (ctrlKey && platform !== 'darwin'));