Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support opening branches popup from all tabs #2709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
kpbaks wants to merge 1 commit into gitui-org:master
base: master
Choose a base branch
Loading
from kpbaks:open-branches-from-all-tabs
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* new command-line option to override the default log file path (`--logfile`) [[@acuteenvy](https://github.com/acuteenvy)] ([#2539](https://github.com/gitui-org/gitui/pull/2539))
* dx: `make check` checks Cargo.toml dependency ordering using `cargo sort` [[@naseschwarz](https://github.com/naseschwarz)]
* add `use_selection_fg` to theme file to allow customizing selection foreground color [[@Upsylonbare](https://github.com/Upsylonbare)] ([#2515](https://github.com/gitui-org/gitui/pull/2515))
* Support opening branches popup from all tabs [[@kpbaks](https://github.com/kpbaks)] ([#2709](https://github.com/gitui-org/gitui/pull/2709))

### Changed
* improve error messages [[@acuteenvy](https://github.com/acuteenvy)] ([#2617](https://github.com/gitui-org/gitui/pull/2617))
Expand Down
13 changes: 13 additions & 0 deletions src/components/revision_files.rs
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,13 @@ impl Component for RevisionFilesComponent {
)
.order(order::RARE_ACTION),
);
out.push(CommandInfo::new(
strings::commands::open_branch_select_popup(
&self.key_config,
),
true,
self.is_visible() || force_all,
));
tree_nav_cmds(&self.tree, &self.key_config, out);
} else {
self.current_file.commands(out, force_all);
Expand Down Expand Up @@ -523,6 +530,12 @@ impl Component for RevisionFilesComponent {
);
}
return Ok(EventState::Consumed);
} else if key_match(
key,
self.key_config.keys.select_branch,
) {
self.queue.push(InternalEvent::SelectBranch);
return Ok(EventState::Consumed);
} else if !is_tree_focused {
return self.current_file.event(event);
}
Expand Down
13 changes: 13 additions & 0 deletions src/tabs/stashing.rs
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ impl Component for Stashing {
self.visible,
self.visible || force_all,
));
out.push(CommandInfo::new(
strings::commands::open_branch_select_popup(
&self.key_config,
),
true,
true,
));
}

visibility_blocking(self)
Expand Down Expand Up @@ -242,6 +249,12 @@ impl Component for Stashing {
!self.options.stash_untracked;
self.update()?;
Ok(EventState::Consumed)
} else if key_match(
k,
self.key_config.keys.select_branch,
) {
self.queue.push(InternalEvent::SelectBranch);
return Ok(EventState::Consumed);
} else {
Ok(EventState::NotConsumed)
};
Expand Down
13 changes: 13 additions & 0 deletions src/tabs/stashlist.rs
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ impl Component for StashList {
selection_valid,
true,
));
out.push(CommandInfo::new(
strings::commands::open_branch_select_popup(
&self.key_config,
),
true,
true,
));
}

visibility_blocking(self)
Expand Down Expand Up @@ -214,6 +221,12 @@ impl Component for StashList {
self.key_config.keys.stash_open,
) {
self.inspect();
} else if key_match(
k,
self.key_config.keys.select_branch,
) {
self.queue.push(InternalEvent::SelectBranch);
return Ok(EventState::Consumed);
}
}
}
Expand Down

AltStyle によって変換されたページ (->オリジナル) /