Skip to content

fix: use Files-specific keybinding for reset-to-upstream in files view#5152

Closed
majiayu000 wants to merge 1 commit intojesseduffield:masterfrom
majiayu000:fix-5150-viewresetoptions-of-commits-vi-1231-0734
Closed

fix: use Files-specific keybinding for reset-to-upstream in files view#5152
majiayu000 wants to merge 1 commit intojesseduffield:masterfrom
majiayu000:fix-5150-viewresetoptions-of-commits-vi-1231-0734

Conversation

@majiayu000
Copy link
Copy Markdown
Contributor

Fixes #5150

Changes

  • Added ViewResetToUpstreamOptions to KeybindingFilesConfig with default key U
  • Fixed files_controller.go to use the Files-specific keybinding instead of opts.Config.Commits.ViewResetOptions

The bug was caused by the reset-to-upstream action in the files view incorrectly using opts.Config.Commits.ViewResetOptions (the commits view config), which caused the commits view keybinding to "bleed" into the files view.

The files controller was incorrectly using opts.Config.Commits.ViewResetOptions
(default "g") for the reset-to-upstream menu, which caused the commits view's
keybinding to "bleed" into the files view. This fix adds a new config option
Files.ViewResetToUpstreamOptions (default "U") and uses it in the files
controller, ensuring proper separation of keybindings between views.

Fixes jesseduffield#5150

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: majiayu000 <1835304752@qq.com>
@majiayu000
Copy link
Copy Markdown
Contributor Author

Closing this PR due to extended inactivity. Happy to reopen if there's still interest — feel free to comment.

@majiayu000 majiayu000 closed this Mar 20, 2026
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.

viewResetOptions of commits view bleeds into the files view

1 participant