Skip to content

Commit 5683de0

Browse files
committed
prevent selection on scroll
1 parent b1974af commit 5683de0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/vs/editor/browser/view/viewController.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,11 @@ export class ViewController {
133133
const options = this.configuration.options;
134134
const selectionClipboardIsOn = (platform.isLinux && options.get(EditorOption.selectionClipboard));
135135
const columnSelection = options.get(EditorOption.columnSelection);
136-
if (data.middleButton && !selectionClipboardIsOn) {
137-
this._columnSelect(data.position, data.mouseColumn, data.inSelectionMode);
136+
const scrollOnMiddleClick = options.get(EditorOption.scrollOnMiddleClick);
137+
if (data.middleButton && !selectionClipboardIsOn && (columnSelection || scrollOnMiddleClick)) {
138+
if (columnSelection) {
139+
this._columnSelect(data.position, data.mouseColumn, data.inSelectionMode);
140+
}
138141
} else if (data.startedOnLineNumbers) {
139142
// If the dragging started on the gutter, then have operations work on the entire line
140143
if (this._hasMulticursorModifier(data)) {

0 commit comments

Comments
 (0)