]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/ui/tools/listener/history/history.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / ui / tools / listener / history / history.factor
index 5e03ab21ad1242cb545377df63ceb509172d0ed8..dae9e26dc8df7bdbfb2c28096721556a67d5b0c0 100644 (file)
@@ -10,7 +10,7 @@ TUPLE: history document elements index ;
     V{ } clone 0 history boa ;
 
 : history-add ( history -- input )
-    dup elements>> length 1+ >>index
+    dup elements>> length 1 + >>index
     [ document>> doc-string [ <input> ] [ empty? ] bi ] keep
     '[ [ _ elements>> push ] keep ] unless ;
 
@@ -32,7 +32,7 @@ TUPLE: history document elements index ;
     [ set-doc-string ] [ clear-undo drop ] 2bi ;
 
 : change-history-index ( history i -- )
-    over elements>> length 1-
+    over elements>> length 1 -
     '[ _ + _ min 0 max ] change-index drop ;
 
 : history-recall ( history i -- )