1 Commits

Author SHA1 Message Date
383ef39cd7 feat: allow ctrl+c to exit application
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
2025-01-07 22:22:17 +01:00
4 changed files with 9 additions and 7 deletions

View File

@@ -6,11 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.3.1] - 2025-01-02
### Other
- enable publish
## [0.3.0] - 2025-01-01
### Added

2
Cargo.lock generated
View File

@@ -747,7 +747,7 @@ dependencies = [
[[package]]
name = "gitnow"
version = "0.2.3"
version = "0.3.0"
dependencies = [
"anyhow",
"async-trait",

View File

@@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"
[workspace.package]
version = "0.3.1"
version = "0.3.0"
[workspace.dependencies]

View File

@@ -36,6 +36,7 @@ impl InteractiveApp for &'static crate::app::App {
}
mod app {
use crossterm::event::KeyModifiers;
use ratatui::{
crossterm::event::{self, Event, KeyCode},
layout::{Constraint, Layout},
@@ -92,6 +93,12 @@ mod app {
terminal.draw(|frame| self.draw(frame))?;
if let Event::Key(key) = event::read()? {
if let KeyCode::Char('c') = key.code {
if key.modifiers.contains(KeyModifiers::CONTROL) {
return Ok(None);
}
}
match key.code {
KeyCode::Char(letter) => {
self.current_search.push(letter);