summaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
authorWojciech Kępka2021-06-13 09:29:22 +0000
committerBlaž Hrastnik2021-06-13 11:48:18 +0000
commitb9100fbd44ee91d099ac95db3d0503dfcad80cff (patch)
tree1567a2df31c355a4eae95871c7d9e90f037099ed /helix-term/src/commands.rs
parent52d3c29244584b94209152c466618d29556e8743 (diff)
Fix clippy
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index b7c3fe81..38f4ce10 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -914,10 +914,8 @@ mod cmd {
fn quit(editor: &mut Editor, args: &[&str], event: PromptEvent) {
// last view and we have unsaved changes
- if editor.tree.views().count() == 1 {
- if _buffers_remaining(editor) {
- return;
- }
+ if editor.tree.views().count() == 1 && _buffers_remaining(editor) {
+ return;
}
editor.close(editor.view().id, /* close_buffer */ false);
}
@@ -1056,10 +1054,8 @@ mod cmd {
editor.set_error(errors);
if quit {
- if !force {
- if _buffers_remaining(editor) {
- return;
- }
+ if !force && _buffers_remaining(editor) {
+ return;
}
// close all views
@@ -1083,10 +1079,8 @@ mod cmd {
}
fn _quit_all(editor: &mut Editor, args: &[&str], event: PromptEvent, force: bool) {
- if !force {
- if _buffers_remaining(editor) {
- return;
- }
+ if !force && _buffers_remaining(editor) {
+ return;
}
// close all views