summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Oram <dev@mitmaro.ca>2019-07-24 20:45:58 -0230
committerTim Oram <dev@mitmaro.ca>2019-07-24 20:45:58 -0230
commitf0d1078853a3571dd20e0597a36d21debe2e0059 (patch)
treefb9f7a2c0eb07e482b5749fd56d3c5ee154cb421
parente23781a8dc475c956b754117b8638e147a422669 (diff)
Allow quit and write in visual mode
-rw-r--r--src/list/list.rs13
-rw-r--r--src/list/utils.rs12
2 files changed, 23 insertions, 2 deletions
diff --git a/src/list/list.rs b/src/list/list.rs
index 3c3a391..06ef572 100644
--- a/src/list/list.rs
+++ b/src/list/list.rs
@@ -256,6 +256,19 @@ impl<'l> List<'l> {
Input::Help => {
result = result.help(State::List(true));
},
+ Input::Abort => {
+ result = result.state(State::ConfirmAbort);
+ },
+ Input::ForceAbort => {
+ git_interactive.clear();
+ result = result.exit_status(ExitStatus::Good).state(State::Exiting);
+ },
+ Input::Rebase => {
+ result = result.state(State::ConfirmRebase);
+ },
+ Input::ForceRebase => {
+ result = result.exit_status(ExitStatus::Good).state(State::Exiting);
+ },
Input::MoveCursorLeft => {
self.scroll_position.scroll_left(
view_width,
diff --git a/src/list/utils.rs b/src/list/utils.rs
index b10be85..9975789 100644
--- a/src/list/utils.rs
+++ b/src/list/utils.rs
@@ -73,9 +73,13 @@ pub fn get_normal_footer_full(config: &Config) -> String {
pub fn get_visual_footer_full(config: &Config) -> String {
format!(
- " {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}",
+ " {}, {}, {}/{}, {}/{}, {}, {}, {}, {}, {}, {}, {}, {}, {}",
config.input_move_up,
config.input_move_down,
+ config.input_abort,
+ config.input_force_abort,
+ config.input_rebase,
+ config.input_force_rebase,
config.input_move_selection_down,
config.input_move_selection_up,
config.input_action_pick,
@@ -115,9 +119,13 @@ pub fn get_normal_footer_compact(config: &Config) -> String {
pub fn get_visual_footer_compact(config: &Config) -> String {
format!(
- "{},{},{},{},{},{},{},{},{},{},{}",
+ "{},{},{}/{},{}/{},{},{},{},{},{},{},{},{},{}",
get_input_short_name(config.input_move_up.as_str()),
get_input_short_name(config.input_move_down.as_str()),
+ get_input_short_name(config.input_abort.as_str()),
+ get_input_short_name(config.input_force_abort.as_str()),
+ get_input_short_name(config.input_rebase.as_str()),
+ get_input_short_name(config.input_force_rebase.as_str()),
get_input_short_name(config.input_move_selection_down.as_str()),
get_input_short_name(config.input_move_selection_up.as_str()),
get_input_short_name(config.input_action_pick.as_str()),