about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-15 19:12:05 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-15 19:12:05 -0800
commit7c87866f1d7f91d6557900f5b39eb7e62233f5d4 (patch)
tree56c40bbca0066845edf5e24a012e6523d3f14f33
parent5c6840b81b7c74afd6ae65cd96ad229ddfad7503 (diff)
downloadmu-7c87866f1d7f91d6557900f5b39eb7e62233f5d4.tar.gz
2451 - drop zoom/maximize feature
I notice that it isn't working perfectly; after maximize/unmaximize the
editor stops wrapping text, like it still thinks the editor is
maximized.

We don't even use this feature anymore, do we? Just delete it rather
than bother debugging.
-rw-r--r--edit/004-programming-environment.mu125
1 files changed, 0 insertions, 125 deletions
diff --git a/edit/004-programming-environment.mu b/edit/004-programming-environment.mu
index 392fecbd..0915fb33 100644
--- a/edit/004-programming-environment.mu
+++ b/edit/004-programming-environment.mu
@@ -596,131 +596,6 @@ after <global-type> [
   }
 ]
 
-# ctrl-x - maximize/unmaximize the side with focus
-
-scenario maximize-side [
-  trace-until 100/app  # trace too long
-  assume-screen 30/width, 5/height
-  # initialize both halves of screen
-  1:address:array:character <- new [abc]
-  2:address:array:character <- new [def]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
-  screen <- render-all screen, 3:address:programming-environment-data
-  screen-should-contain [
-    .           run (F4)           .
-    .abc            ┊def           .
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━.
-    .               ┊              .
-  ]
-  # hit ctrl-x
-  assume-console [
-    press ctrl-x
-  ]
-  run [
-    event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
-  ]
-  # only left side visible
-  screen-should-contain [
-    .           run (F4)           .
-    .abc                           .
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈.
-    .                              .
-  ]
-  # hit any key to toggle back
-  assume-console [
-    press ctrl-x
-  ]
-  run [
-    event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
-  ]
-  screen-should-contain [
-    .           run (F4)           .
-    .abc            ┊def           .
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━.
-    .               ┊              .
-  ]
-]
-
-#? # ctrl-t - browse trace
-#? after <global-type> [
-#?   {
-#?     browse-trace?:boolean <- equal *c, 20/ctrl-t
-#?     break-unless browse-trace?
-#?     $browse-trace
-#?     screen <- render-all screen, env:address:programming-environment-data
-#?     loop +next-event:label
-#?   }
-#? ]
-
-container programming-environment-data [
-  maximized?:boolean
-]
-
-after <global-type> [
-  {
-    maximize?:boolean <- equal *c, 24/ctrl-x
-    break-unless maximize?
-    screen, console <- maximize screen, console, env:address:programming-environment-data
-    loop +next-event:label
-  }
-]
-
-recipe maximize screen:address:screen, console:address:console, env:address:programming-environment-data -> screen:address:screen, console:address:console [
-  local-scope
-  load-ingredients
-  hide-screen screen
-  # maximize one of the sides
-  maximized?:address:boolean <- get-address *env, maximized?:offset
-  *maximized? <- copy 1/true
-  #
-  sandbox-in-focus?:boolean <- get *env, sandbox-in-focus?:offset
-  {
-    break-if sandbox-in-focus?
-    editor:address:editor-data <- get *env, recipes:offset
-    right:address:number <- get-address *editor, right:offset
-    *right <- screen-width screen
-    *right <- subtract *right, 1
-    screen <- render-recipes screen, env
-  }
-  {
-    break-unless sandbox-in-focus?
-    editor:address:editor-data <- get *env, current-sandbox:offset
-    left:address:number <- get-address *editor, left:offset
-    *left <- copy 0
-    screen <- render-sandbox-side screen, env
-  }
-  show-screen screen
-]
-
-# when maximized, wait for any event and simply unmaximize
-after <handle-event> [
-  {
-    maximized?:address:boolean <- get-address *env, maximized?:offset
-    break-unless *maximized?
-    *maximized? <- copy 0/false
-    # undo maximize
-    {
-      break-if *sandbox-in-focus?
-      editor:address:editor-data <- get *env, recipes:offset
-      right:address:number <- get-address *editor, right:offset
-      *right <- screen-width screen
-      *right <- divide *right, 2
-      *right <- subtract *right, 1
-    }
-    {
-      break-unless *sandbox-in-focus?
-      editor:address:editor-data <- get *env, current-sandbox:offset
-      left:address:number <- get-address *editor, left:offset
-      *left <- screen-width screen
-      *left <- divide *left, 2
-      *left <- add *left, 1
-    }
-    render-all screen, env
-    show-screen screen
-    loop +next-event:label
-  }
-]
-
 ## helpers
 
 recipe draw-vertical screen:address:screen, col:number, y:number, bottom:number [