@@ -42,9 +42,7 @@ async function commandInput(client, cmd="", value="", completions) {
4242 const input = vscode . window . createQuickPick ( )
4343 try {
4444 input . placeholder = cmd . trim ( ) || "PyXT Command"
45- // Disable filter on value change
46- // https://github.com/microsoft/vscode/issues/142941
47- input . _pendingUpdate [ "matchOnLabel" ] = false
45+ disableMatchOnLabel ( input )
4846 input . sortByLabel = false
4947 input . ignoreFocusOut = true
5048 input . pyxt_cmd = cmd
@@ -63,6 +61,21 @@ async function commandInput(client, cmd="", value="", completions) {
6361 }
6462}
6563
64+ function disableMatchOnLabel ( input ) {
65+ // Disable filter on value change
66+ // https://github.com/microsoft/vscode/issues/142941
67+ // TODO PR for https://github.com/microsoft/vscode/issues/83425
68+ // This used to work, but broke in VS Code 1.74.0
69+ //input._pendingUpdate["matchOnLabel"] = false
70+ Object . values ( input ) . forEach ( obj => {
71+ if ( typeof obj !== 'object' ) return
72+ if ( obj . hasOwnProperty ( "id" ) && obj . type === "quickPick"
73+ && obj . placeholder === input . placeholder ) {
74+ obj [ "matchOnLabel" ] = false
75+ }
76+ } )
77+ }
78+
6679function dispatch ( result , client , cmd , value ) {
6780 if ( ! result ) {
6881 return Promise . resolve ( )
0 commit comments