fix(coding-agent): show item count instead of line count in config scroll indicator (#3820)
This commit is contained in:
@@ -348,7 +348,10 @@ class ResourceList implements Component, Focusable {
|
||||
|
||||
// Scroll indicator
|
||||
if (startIndex > 0 || endIndex < this.filteredItems.length) {
|
||||
lines.push(theme.fg("dim", ` (${this.selectedIndex + 1}/${this.filteredItems.length})`));
|
||||
const itemCount = this.filteredItems.filter((e) => e.type === "item").length;
|
||||
const currentItemIndex =
|
||||
this.filteredItems.slice(0, this.selectedIndex).filter((e) => e.type === "item").length + 1;
|
||||
lines.push(theme.fg("dim", ` (${currentItemIndex}/${itemCount})`));
|
||||
}
|
||||
|
||||
return lines;
|
||||
|
||||
Reference in New Issue
Block a user