]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.gadgets.editors: fix stack effect of change-caret quotation.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 29 Dec 2012 01:01:32 +0000 (17:01 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 29 Dec 2012 01:01:32 +0000 (17:01 -0800)
basis/ui/gadgets/editors/editors-docs.factor
basis/ui/gadgets/editors/editors.factor

index 3f7594ac013e422ddcadb79ce7e554c5121dc55f..38c79663bbd575b15752af65529fb85d75acef75 100644 (file)
@@ -32,7 +32,7 @@ HELP: editor-mark
 { $description "Outputs the current mark location as a line/column number pair." } ;
 
 HELP: change-caret
-{ $values { "editor" editor } { "quot" { $quotation "( loc -- newloc )" } } }
+{ $values { "editor" editor } { "quot" { $quotation "( loc document -- newloc )" } } }
 { $description "Applies a quotation to the current caret location and moves the caret to the location output by the quotation." } ;
 
 { change-caret change-caret&mark mark>caret } related-words
@@ -42,7 +42,7 @@ HELP: mark>caret
 { $description "Moves the mark to the caret location, effectively deselecting any selected text." } ;
 
 HELP: change-caret&mark
-{ $values { "editor" editor } { "quot" { $quotation "( loc -- newloc )" } } }
+{ $values { "editor" editor } { "quot" { $quotation "( loc document -- newloc )" } } }
 { $description "Applies a quotation to the current caret location and moves the caret and the mark to the location output by the quotation." } ;
 
 HELP: point>loc
index ab385d48d058d6a23a932c3ed04eae0b2d75ae06..a321640107a9e53d4a462a2b48add2eb0f8e63ce 100644 (file)
@@ -96,14 +96,14 @@ M: editor ungraft*
 : set-caret ( loc editor -- )
     [ model>> validate-loc ] [ caret>> ] bi set-model ;
 
-: change-caret ( editor quot -- )
+: change-caret ( editor quot: ( loc document -- newloc ) -- )
     [ [ [ editor-caret ] [ model>> ] bi ] dip call ] [ drop ] 2bi
     set-caret ; inline
 
 : mark>caret ( editor -- )
     [ editor-caret ] [ mark>> ] bi set-model ;
 
-: change-caret&mark ( editor quot -- )
+: change-caret&mark ( editor quot: ( loc document -- newloc ) -- )
     [ change-caret ] [ drop mark>caret ] 2bi ; inline
 
 : editor-line ( n editor -- str ) control-value nth ;