Skip to content

Commit

Permalink
Fixes #49693: Disable column selection with middle mouse button if se…
Browse files Browse the repository at this point in the history
…lection clipboard is enabled on Linux
  • Loading branch information
alexdima committed Oct 11, 2019
1 parent 72bc289 commit 95ebd1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/editor/browser/view/viewController.ts
Expand Up @@ -13,6 +13,7 @@ import { IConfiguration } from 'vs/editor/common/editorCommon';
import { IViewModel } from 'vs/editor/common/viewModel/viewModel';
import { IMouseWheelEvent } from 'vs/base/browser/mouseEvent';
import { EditorOption } from 'vs/editor/common/config/editorOptions';
import * as platform from 'vs/base/common/platform';

export interface IMouseDispatchData {
position: Position;
Expand Down Expand Up @@ -132,7 +133,8 @@ export class ViewController {
}

public dispatchMouse(data: IMouseDispatchData): void {
if (data.middleButton) {
const selectionClipboardIsOn = (platform.isLinux && this.configuration.options.get(EditorOption.selectionClipboard));
if (data.middleButton && !selectionClipboardIsOn) {
this._columnSelect(data.position, data.mouseColumn, data.inSelectionMode);
} else if (data.startedOnLineNumbers) {
// If the dragging started on the gutter, then have operations work on the entire line
Expand Down

0 comments on commit 95ebd1a

Please sign in to comment.