sup

A curses threads-with-tags style email client

sup.git

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

give message in more no-uri cases

Diffstat:
M lib/sup/modes/thread_view_mode.rb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/sup/modes/thread_view_mode.rb b/lib/sup/modes/thread_view_mode.rb
@@ -752,7 +752,7 @@ EOS
       .take_while{|d| d[0] == :text_color and d[1].strip != ""} # Only take up to the first "" alone on its line
       .map{|d| d[1].strip}.join("").strip
 
-
+    found = false
     (linetext || "").scan(URI::regexp).each do |matches|
       begin
         link = $& # ruby magic: $& is the whole regexp match
@@ -764,13 +764,14 @@ EOS
         BufferManager.flash "Going to #{reallink} ..."
         HookManager.run "goto", :uri => reallink
         BufferManager.completely_redraw_screen
+        found = true
 
       rescue URI::InvalidURIError => e
         debug "not a uri: #{e}"
         # Do nothing, this is an ok flow
-        BufferManager.flash "No URI found."
       end
     end
+    BufferManager.flash "No URI found." unless found
   end
 
 private