fix(vscode): jump to first match automatically while typing/toggling

This commit is contained in:
Sylwester Liljegren
2026-07-10 03:23:46 +02:00
parent 7e9a984f08
commit e6deb63f32
@@ -307,7 +307,14 @@ export const MessageList: Component<MessageListProps> = (props) => {
createEffect(
on(
() => [search.query(), search.matchCase(), search.wholeWord(), search.regex()],
() => search.setIndex(0),
() => {
search.setIndex(0)
// Jump straight to the first match as the user types/toggles an
// option, instead of leaving them to press Enter/an arrow just to
// see where the current query actually landed. `requestJump` is a
// no-op when there are no matches (guarded in the jump effect).
search.requestJump()
},
),
)