(index: number)
| 750 | } |
| 751 | |
| 752 | function selectSearchSnippet(index: number) { |
| 753 | if ( |
| 754 | !displayedSnippets.value |
| 755 | || index < 0 |
| 756 | || index >= displayedSnippets.value.length |
| 757 | ) { |
| 758 | return |
| 759 | } |
| 760 | |
| 761 | const snippet = displayedSnippets.value[index] |
| 762 | selectSnippet(snippet.id) |
| 763 | searchSelectedIndex.value = index |
| 764 | nextTick(() => scrollToSnippetIndex(index)) |
| 765 | } |
| 766 | |
| 767 | function clearSearch(restoreState = false) { |
| 768 | if (restoreState && !isRestoreStateBlocked.value) { |
nothing calls this directly
no test coverage detected