mirror of
https://github.com/t8y2/dbx.git
synced 2026-11-02 00:29:30 +00:00
fix(grid): remove unused search memo key function and computed property
This commit is contained in:
@@ -1632,24 +1632,6 @@ const searchMatchSet = computed(() => {
|
||||
return set;
|
||||
});
|
||||
|
||||
const searchRowMemoKeys = computed(() => {
|
||||
const rows = new Map<number, string[]>();
|
||||
for (const match of searchMatches.value) {
|
||||
const row = rows.get(match.displayRow) ?? [];
|
||||
row.push(String(match.col));
|
||||
rows.set(match.displayRow, row);
|
||||
}
|
||||
|
||||
const current = searchMatches.value[currentMatchIndex.value];
|
||||
if (current) {
|
||||
const row = rows.get(current.displayRow) ?? [];
|
||||
row.push(`current:${current.col}`);
|
||||
rows.set(current.displayRow, row);
|
||||
}
|
||||
|
||||
return new Map([...rows].map(([row, parts]) => [row, parts.join("|")]));
|
||||
});
|
||||
|
||||
watch(searchMatches, (matches) => {
|
||||
currentMatchIndex.value = matches.length > 0 ? 0 : -1;
|
||||
});
|
||||
@@ -1665,10 +1647,6 @@ function cellIsCurrentMatch(displayRow: number, col: number): boolean {
|
||||
return m.displayRow === displayRow && m.col === col;
|
||||
}
|
||||
|
||||
function rowSearchMemoKey(index: number): string {
|
||||
return searchRowMemoKeys.value.get(index) ?? "";
|
||||
}
|
||||
|
||||
function navigateMatch(delta: number) {
|
||||
const total = searchMatches.value.length;
|
||||
if (total === 0) return;
|
||||
|
||||
Reference in New Issue
Block a user