sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 7771780bf994ce5f83be82ae4b39b19a25fc1419
parent 13e0035d02bb88e33b8093e7b346d2520deb59c7
Author: Gaute Hope <eg@gaute.vetsj.com>
Date:   Wed, 25 Feb 2015 15:04:38 +0100

fix #399: faulty use of inline else

by suggetion of @cscorley, typing out full if..else

Diffstat:
M lib/sup/modes/thread_index_mode.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/sup/modes/thread_index_mode.rb b/lib/sup/modes/thread_index_mode.rb
@@ -1026,7 +1026,11 @@ private
   end
 
   def from_width
-    [(buffer.content_width.to_f * 0.2).to_i, MIN_FROM_WIDTH].max if buffer else MIN_FROM_WIDTH # not sure why the buffer is gone
+    if buffer
+      [(buffer.content_width.to_f * 0.2).to_i, MIN_FROM_WIDTH].max
+    else
+      MIN_FROM_WIDTH # not sure why the buffer is gone
+    end
   end
 
   def initialize_threads