about summary refs log tree commit diff stats
path: root/edit
diff options
context:
space:
mode:
Diffstat (limited to 'edit')
-rw-r--r--edit/001-editor.mu12
-rw-r--r--edit/003-shortcuts.mu2
-rw-r--r--edit/004-programming-environment.mu4
-rw-r--r--edit/012-editor-undo.mu5
4 files changed, 10 insertions, 13 deletions
diff --git a/edit/001-editor.mu b/edit/001-editor.mu
index 170468cd..c3e8e6da 100644
--- a/edit/001-editor.mu
+++ b/edit/001-editor.mu
@@ -73,9 +73,9 @@ def insert-text editor:&:editor, text:text -> editor:&:editor [
   local-scope
   load-ingredients
   # early exit if text is empty
-  return-unless text, editor/same-as-ingredient:0
+  return-unless text
   len:num <- length *text
-  return-unless len, editor/same-as-ingredient:0
+  return-unless len
   idx:num <- copy 0
   # now we can start appending the rest, character by character
   curr:&:duplex-list:char <- get *editor, data:offset
@@ -89,7 +89,6 @@ def insert-text editor:&:editor, text:text -> editor:&:editor [
     idx <- add idx, 1
     loop
   }
-  return editor/same-as-ingredient:0
 ]
 
 scenario editor-initializes-without-data [
@@ -123,7 +122,7 @@ scenario editor-initializes-without-data [
 def render screen:&:screen, editor:&:editor -> last-row:num, last-column:num, screen:&:screen, editor:&:editor [
   local-scope
   load-ingredients
-  return-unless editor, 1/top, 0/left, screen/same-as-ingredient:0, editor/same-as-ingredient:1
+  return-unless editor, 1/top, 0/left
   left:num <- get *editor, left:offset
   screen-height:num <- screen-height screen
   right:num <- get *editor, right:offset
@@ -218,7 +217,7 @@ def render screen:&:screen, editor:&:editor -> last-row:num, last-column:num, sc
   *editor <- put *editor, cursor-row:offset, cursor-row
   *editor <- put *editor, cursor-column:offset, cursor-column
   *editor <- put *editor, before-cursor:offset, before-cursor
-  return row, column, screen/same-as-ingredient:0, editor/same-as-ingredient:1
+  return row, column
 ]
 
 def clear-screen-from screen:&:screen, row:num, column:num, left:num, right:num -> screen:&:screen [
@@ -228,13 +227,12 @@ def clear-screen-from screen:&:screen, row:num, column:num, left:num, right:num
   {
     break-if screen
     clear-display-from row, column, left, right
-    return screen/same-as-ingredient:0
+    return
   }
   # if not, go the slower route
   screen <- move-cursor screen, row, column
   clear-line-until screen, right
   clear-rest-of-screen screen, row, left, right
-  return screen/same-as-ingredient:0
 ]
 
 def clear-rest-of-screen screen:&:screen, row:num, left:num, right:num -> screen:&:screen [
diff --git a/edit/003-shortcuts.mu b/edit/003-shortcuts.mu
index 27710ea8..b747a869 100644
--- a/edit/003-shortcuts.mu
+++ b/edit/003-shortcuts.mu
@@ -478,7 +478,7 @@ def move-cursor-coordinates-right editor:&:editor, screen-height:num -> editor:&
     cursor-column <- copy left
     *editor <- put *editor, cursor-column:offset, cursor-column
     below-screen?:bool <- greater-or-equal cursor-row, screen-height  # must be equal
-    return-unless below-screen?, editor/same-as-ingredient:0, 0/no-more-render
+    return-unless below-screen?, editor, 0/no-more-render
     <scroll-down>
     cursor-row <- subtract cursor-row, 1  # bring back into screen range
     *editor <- put *editor, cursor-row:offset, cursor-row
diff --git a/edit/004-programming-environment.mu b/edit/004-programming-environment.mu
index 2a2dcdfa..7747e7a1 100644
--- a/edit/004-programming-environment.mu
+++ b/edit/004-programming-environment.mu
@@ -204,7 +204,7 @@ def resize screen:&:screen, env:&:environment -> env:&:environment, screen:&:scr
 def render-without-moving-cursor screen:&:screen, editor:&:editor -> last-row:num, last-column:num, screen:&:screen, editor:&:editor [
   local-scope
   load-ingredients
-  return-unless editor, 1/top, 0/left, screen/same-as-ingredient:0, editor/same-as-ingredient:1
+  return-unless editor, 1/top, 0/left
   left:num <- get *editor, left:offset
   screen-height:num <- screen-height screen
   right:num <- get *editor, right:offset
@@ -278,7 +278,7 @@ def render-without-moving-cursor screen:&:screen, editor:&:editor -> last-row:nu
   # save first character off-screen
   *editor <- put *editor, bottom-of-screen:offset, curr
   *editor <- put *editor, bottom:offset, row
-  return row, column, screen/same-as-ingredient:0, editor/same-as-ingredient:1
+  return row, column
 ]
 
 scenario point-at-multiple-editors [
diff --git a/edit/012-editor-undo.mu b/edit/012-editor-undo.mu
index ecc0707d..c69e6c82 100644
--- a/edit/012-editor-undo.mu
+++ b/edit/012-editor-undo.mu
@@ -74,7 +74,7 @@ after <handle-special-character> [
     redo <- push op, redo
     *editor <- put *editor, redo:offset, redo
     <handle-undo>
-    return screen/same-as-ingredient:0, editor/same-as-ingredient:1, 1/go-render
+    return screen, editor, 1/go-render
   }
 ]
 
@@ -92,7 +92,7 @@ after <handle-special-character> [
     undo <- push op, undo
     *editor <- put *editor, undo:offset, undo
     <handle-redo>
-    return screen/same-as-ingredient:0, editor/same-as-ingredient:1, 1/go-render
+    return screen, editor, 1/go-render
   }
 ]
 
@@ -206,7 +206,6 @@ def add-operation editor:&:editor, op:&:operation -> editor:&:editor [
   redo:&:list:&:operation <- get *editor, redo:offset
   redo <- copy 0
   *editor <- put *editor, redo:offset, redo
-  return editor/same-as-ingredient:0
 ]
 
 after <handle-undo> [