about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-06 23:11:32 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-06 23:11:32 +0000
commit0c747be3852e204ddbf9f4081f021b0eea08aa85 (patch)
tree7f0920be7f8a44f68de83985c576d524fd2776f6 /bin
parent375772bc4fb32d5cc957268de65eea01620a335a (diff)
downloaddtas-0c747be3852e204ddbf9f4081f021b0eea08aa85.tar.gz
Lightly tested, but this seems to work.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dtas-console10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/dtas-console b/bin/dtas-console
index 6d5672b..eb246ee 100755
--- a/bin/dtas-console
+++ b/bin/dtas-console
@@ -39,6 +39,8 @@ tfmt = update_tfmt(prec_step[prec_nr])
 events = []
 interval = 1.0 / 10 ** prec_nr
 
+pause = nil
+
 def show_events(lineno, screen, events)
   Curses.setpos(lineno += 1, 0)
   Curses.clrtoeol
@@ -132,7 +134,7 @@ begin
     else
       Curses.setpos(lineno += 1, 0)
       Curses.clrtoeol
-      Curses.addstr(cur['paused'] ? 'paused' : 'idle')
+      Curses.addstr(cur['paused'] ? "paused #{pause}" : 'idle')
       Curses.setpos(lineno += 1, 0)
       Curses.clrtoeol
     end
@@ -153,6 +155,12 @@ begin
         Curses.clear
       when w
         event = w.res_wait
+        case event
+        when "pause"
+          pause = current['infile'] || current['command']
+        when %r{\Afile }
+          pause = nil
+        end
         events << "#{Time.now.strftime(tfmt)} #{event}"
         # something happened, refresh current
         # we could be more intelligent here, maybe, but too much work.