about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-07-31 01:27:59 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-07-31 01:27:59 -0700
commit5daf8305cfe3225eda24a496cb34c2bbb0a90126 (patch)
tree52924b45c8b0764e283471d5ef269c0ccb2fa693
parent8ce71ea092832f07ad1254827d099b33f217d95c (diff)
downloadmu-5daf8305cfe3225eda24a496cb34c2bbb0a90126.tar.gz
1906
-rw-r--r--edit.mu12
1 files changed, 4 insertions, 8 deletions
diff --git a/edit.mu b/edit.mu
index bb97984d..48669347 100644
--- a/edit.mu
+++ b/edit.mu
@@ -2620,7 +2620,8 @@ recipe event-loop [
       # send to both editors
       _ <- move-cursor-in-editor screen, recipes, *t
       *sandbox-in-focus? <- move-cursor-in-editor screen, current-sandbox, *t
-      jump +continue:label
+      render-minimal screen, env
+      loop +next-event:label
     }
     # if it's not global and not a touch event, send to appropriate editor
     {
@@ -2632,13 +2633,8 @@ recipe event-loop [
         break-unless *sandbox-in-focus?
         handle-event screen, console, current-sandbox, e:event
       }
-    }
-    +continue
-    # if no more events currently left to process, render.
-    # we rely on 'render' to update 'before-cursor' on pointer events, but
-    # they won't usually come fast enough to trigger this.
-    # todo: test this
-    {
+      # optimization: refresh screen only if no more events
+      # todo: test this
       more-events?:boolean <- has-more-events? console
       break-if more-events?
       render-minimal screen, env