Skip to content

Commit

Permalink
fix #2126
Browse files Browse the repository at this point in the history
  • Loading branch information
extrawurst committed Mar 20, 2024
1 parent b43c4c0 commit e47209e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/popups/tag_commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,12 @@ impl Component for TagCommitPopup {

fn event(&mut self, ev: &Event) -> Result<EventState> {
if self.is_visible() {
if self.input.event(ev)?.is_consumed() {
return Ok(EventState::Consumed);
}

if let Event::Key(e) = ev {
if key_match(e, self.key_config.keys.enter)
&& self.is_valid_tag()
{
try_or_popup!(self, "tag error:", self.tag());
return Ok(EventState::Consumed);
} else if key_match(
e,
self.key_config.keys.tag_annotate,
Expand All @@ -93,10 +90,12 @@ impl Component for TagCommitPopup {
strings::tag_popup_annotation_msg(),
);
self.mode = Mode::Annotation { tag_name };
return Ok(EventState::Consumed);
}

return Ok(EventState::Consumed);
}

self.input.event(ev)?;
return Ok(EventState::Consumed);
}
Ok(EventState::NotConsumed)
}
Expand Down

0 comments on commit e47209e

Please sign in to comment.