shithub: orca

Download patch

ref: 579fa84ebf4555f08b9045665099eb78a0f79851
parent: 6186830e93254edbe42390b798e147d958327081
author: cancel <cancel@cancel.fm>
date: Sun Jan 26 17:08:04 EST 2020

Cleanup

--- a/tui_main.c
+++ b/tui_main.c
@@ -1864,19 +1864,15 @@
     a->is_draw_dirty = true;
     break;
   case Ged_input_cmd_toggle_append_mode:
-    if (a->input_mode == Ged_input_mode_append) {
-      a->input_mode = Ged_input_mode_normal;
-    } else {
-      a->input_mode = Ged_input_mode_append;
-    }
+    a->input_mode = a->input_mode == Ged_input_mode_append
+                        ? Ged_input_mode_normal
+                        : Ged_input_mode_append;
     a->is_draw_dirty = true;
     break;
   case Ged_input_cmd_toggle_selresize_mode:
-    if (a->input_mode == Ged_input_mode_selresize) {
-      a->input_mode = Ged_input_mode_normal;
-    } else {
-      a->input_mode = Ged_input_mode_selresize;
-    }
+    a->input_mode = a->input_mode == Ged_input_mode_selresize
+                        ? Ged_input_mode_normal
+                        : Ged_input_mode_selresize;
     a->is_draw_dirty = true;
     break;
   case Ged_input_cmd_toggle_slide_mode: