!isSearching && onDirectoryContextMenu(e)}
+ >
- {#if showNewInput}
+ {#if showNewInput && !isSearching}
+ {:else}
+ {#snippet resultRows(matches: FileMatch[])}
+ {#each matches as match (match.path)}
+
+ {#if match.content_matches.length > 0}
+ {@const preview = match.content_matches[0]}
+
+ {/if}
+ {/each}
+ {/snippet}
+
+ {#if filenameMatches.length > 0}
+
+ {@render resultRows(filenameMatches)}
+ {/if}
+
+ {#if contentOnlyMatches.length > 0}
+
+ {@render resultRows(contentOnlyMatches)}
+ {/if}
+ {#if nextMatchOffset !== null}
+
+ {/if}
+ {/if}
{:else if visibleEntries.length === 0 && !showNewInput}
@@ -1157,7 +1387,7 @@
: null}