feat(tui): focus first file in file tree (#28513)
This commit is contained in:
parent
4cbeacbc76
commit
58143c4b07
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ function DiffViewer(props: { api: TuiPluginApi }) {
|
||||||
const next =
|
const next =
|
||||||
lastHighlighted !== undefined && fileRows().some((row) => row.id === lastHighlighted)
|
lastHighlighted !== undefined && fileRows().some((row) => row.id === lastHighlighted)
|
||||||
? lastHighlighted
|
? lastHighlighted
|
||||||
: fileRows()[0]?.id
|
: fileRows().find((row) => row.fileIndex !== undefined)?.id
|
||||||
setHighlightedFileNode(next)
|
setHighlightedFileNode(next)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue