Skip to content

Commit

Permalink
[action/delete-charEOF] simplify implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lotabout committed Jun 8, 2019
1 parent c3995ed commit d67e773
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion man/man1/sk.1
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ e.g. \fBsk --bind=ctrl-j:accept,ctrl-k:kill-line\fR
\fBbeginning-of-line\fR \fIctrl-a home\fR
\fBclear-screen\fR \fIctrl-l\fR
\fBdelete-char\fR \fIdel\fR
\fBdelete-char/eof\fR \fIctrl-d\fR
\fBdelete-charEOF\fR \fIctrl-d\fR
\fBdeselect-all\fR
\fBdown\fR \fIctrl-j ctrl-n down\fR
\fBend-of-line\fR \fIctrl-e end\fR
Expand Down
10 changes: 2 additions & 8 deletions src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,8 @@ impl Model {

Event::EvActDeleteCharEOF => {
if env.query.is_empty() {
let _ = self.term.send_event(TermEvent::Key(Key::Null));
if let Some(ctrl) = self.reader_control.take() {
ctrl.kill();
}
if let Some(ctrl) = self.matcher_control.take() {
ctrl.kill();
}
return None;
next_event = Some((Event::EvActAbort, Box::new(true)));
continue;
}
}

Expand Down

0 comments on commit d67e773

Please sign in to comment.