Skip to content

Commit acafdbd

Browse files
Disable navigating by separator while quick navigating (microsoft#210798)
Fixes microsoft#210461 in a pragmatic way until I can come up with a better solution.
1 parent 8c5ef74 commit acafdbd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/vs/platform/quickinput/browser/quickInput.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,10 @@ export class QuickPick<T extends IQuickPickItem> extends QuickInput implements I
831831
this.visibleDisposables.add((this._hideInput ? this.ui.list : this.ui.inputBox).onKeyDown((event: KeyboardEvent | StandardKeyboardEvent) => {
832832
switch (event.keyCode) {
833833
case KeyCode.DownArrow:
834-
if (isMacintosh ? event.metaKey : event.altKey) {
834+
// Don't support focusing next separator when quick navigate is enabled
835+
// ref: https://github.com/microsoft/vscode/issues/210461
836+
// TODO: Could we do this in a way that could play nice with quick navigate?
837+
if (this.quickNavigate === undefined && (isMacintosh ? event.metaKey : event.altKey)) {
835838
this.ui.list.focus(QuickInputListFocus.NextSeparator);
836839
} else {
837840
this.ui.list.focus(QuickInputListFocus.Next);
@@ -842,7 +845,8 @@ export class QuickPick<T extends IQuickPickItem> extends QuickInput implements I
842845
dom.EventHelper.stop(event, true);
843846
break;
844847
case KeyCode.UpArrow:
845-
if (isMacintosh ? event.metaKey : event.altKey) {
848+
// Don't support focusing next separator when quick navigate is enabled
849+
if (this.quickNavigate === undefined && (isMacintosh ? event.metaKey : event.altKey)) {
846850
this.ui.list.focus(QuickInputListFocus.PreviousSeparator);
847851
} else {
848852
this.ui.list.focus(QuickInputListFocus.Previous);

0 commit comments

Comments
 (0)