Skip to content

Commit 46cbc45

Browse files
committed
chore: add 'Last selected' label
1 parent 9efea0b commit 46cbc45

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/extension.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ export function activate (context: vscode.ExtensionContext) {
3636
return acc
3737
}, []) as vscode.QuickPickItem[]
3838

39-
options.sort(i => i.picked ? -1 : 1)
39+
const isExist = options.find(i => i.picked)
40+
41+
if (isExist) {
42+
options.sort(i => i.picked ? -1 : 1)
43+
options.unshift({
44+
label: 'Last selected',
45+
kind: -1
46+
})
47+
}
4048

4149
let snippet: Snippet | undefined
4250
let fragmentContent = ''

0 commit comments

Comments
 (0)