Skip to content

Add optional staged and unstaged tabs in the files panel#5589

Open
h4kbas wants to merge 2 commits intojesseduffield:masterfrom
h4kbas:master
Open

Add optional staged and unstaged tabs in the files panel#5589
h4kbas wants to merge 2 commits intojesseduffield:masterfrom
h4kbas:master

Conversation

@h4kbas
Copy link
Copy Markdown

@h4kbas h4kbas commented May 6, 2026

PR Description

Add an optional Files-panel tab layout that separates changed files by index state.

When gui.showFileChangeTabs is enabled, the Files window includes two additional tabs:

  • Unstaged: shows files with unstaged changes
  • Staged: shows files with staged changes

This is integrated into the existing tab system (including [ / ] navigation and tab clicks), while preserving the current default behavior.

By default, this feature is disabled (gui.showFileChangeTabs: false), so existing users keep the current tab layout (Files, Worktrees, Submodules) unless they explicitly opt in.

Also includes a startup safety fix in files-tab indexing/filter application to prevent nil-pointer panics during early initialization.

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant