diff --git a/frontend/src/ts/commandline/index.ts b/frontend/src/ts/commandline/index.ts index 83af9f0a4..3884e2ac5 100644 --- a/frontend/src/ts/commandline/index.ts +++ b/frontend/src/ts/commandline/index.ts @@ -218,8 +218,18 @@ function updateSuggested(): void { }); } showFound(); - activeIndex = 0; + + // display background hover effect for selected language + const scrollTarget = $(".suggestions .entry .icon i.fa-check"); + const entryIndex = scrollTarget.parent().parent().attr("index"); + if (entryIndex !== undefined) { + activeIndex = parseInt(entryIndex); + } else { + activeIndex = 0; + } + updateActiveEntry(); + keepActiveEntryInView(); } function show(): void {