sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 0ec057b72cd8bd34332b27e6789fd0540eaf1d1d
parent f4cd4301746ae71e7e58b0ef78a269278d299318
Author: Scott Bonds <scott@ggr.com>
Date:   Wed, 24 Sep 2014 17:20:21 -0700

make goto_uri more talkative

Diffstat:
M lib/sup/modes/thread_view_mode.rb | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/sup/modes/thread_view_mode.rb b/lib/sup/modes/thread_view_mode.rb
@@ -733,8 +733,14 @@ EOS
   end
 
   def goto_uri
-    return unless (chunk = @chunk_lines[curpos])
-    return unless HookManager.enabled? "goto"
+    unless (chunk = @chunk_lines[curpos])
+      BufferManager.flash "No URI found."
+      return
+    end
+    unless HookManager.enabled? "goto"
+      BufferManager.flash "You must add a goto.rb hook before you can goto a URI."
+      return
+    end
 
     # @text is a list of lines with this format:
     # [
@@ -761,8 +767,8 @@ EOS
 
       rescue URI::InvalidURIError => e
         debug "not a uri: #{e}"
-        BufferManager.flash "No URL found"
         # Do nothing, this is an ok flow
+        BufferManager.flash "No URI found."
       end
     end
   end