diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aba19c7e0..5c1c40fc19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Fixes +* fix panic when renaming or updating remote URL with no remotes configured [[@xvchris](https://github.com/xvchris)] ([#2868](https://github.com/gitui-org/gitui/issues/2868)) + ## [0.28.0] - 2025-12-14 **discard changes on checkout** diff --git a/src/popups/remotelist.rs b/src/popups/remotelist.rs index 0630e35fb5..f825cddbdd 100644 --- a/src/popups/remotelist.rs +++ b/src/popups/remotelist.rs @@ -146,12 +146,14 @@ impl Component for RemoteListPopup { } else if key_match( e, self.key_config.keys.update_remote_name, - ) { + ) && self.valid_selection() + { self.rename_remote(); } else if key_match( e, self.key_config.keys.update_remote_url, - ) { + ) && self.valid_selection() + { self.update_remote_url(); } }