File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use crate::{
77 strings, ui,
88} ;
99use asyncgit:: { sync, CWD } ;
10- use crossterm:: event:: { Event , KeyCode } ;
10+ use crossterm:: event:: { Event , KeyCode , KeyModifiers } ;
1111use log:: error;
1212use std:: borrow:: Cow ;
1313use strings:: commands;
@@ -76,11 +76,17 @@ impl Component for CommitComponent {
7676 fn event ( & mut self , ev : Event ) -> bool {
7777 if self . visible {
7878 if let Event :: Key ( e) = ev {
79+ let has_ctrl =
80+ e. modifiers . contains ( KeyModifiers :: CONTROL ) ;
7981 match e. code {
8082 KeyCode :: Esc => {
8183 self . hide ( ) ;
8284 }
8385 KeyCode :: Char ( c) => {
86+ // ignore and early out on ctrl+c
87+ if c == 'c' && has_ctrl {
88+ return false ;
89+ }
8490 self . msg . push ( c) ;
8591 }
8692 KeyCode :: Enter if self . can_commit ( ) => {
You can’t perform that action at this time.
0 commit comments