From a46bcfe85c36fdef130f182201639073db69f0bd Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 28 Dec 2012 17:01:32 -0800 Subject: [PATCH] ui.gadgets.editors: fix stack effect of change-caret quotation. --- basis/ui/gadgets/editors/editors-docs.factor | 4 ++-- basis/ui/gadgets/editors/editors.factor | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/ui/gadgets/editors/editors-docs.factor b/basis/ui/gadgets/editors/editors-docs.factor index 3f7594ac01..38c79663bb 100644 --- a/basis/ui/gadgets/editors/editors-docs.factor +++ b/basis/ui/gadgets/editors/editors-docs.factor @@ -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 diff --git a/basis/ui/gadgets/editors/editors.factor b/basis/ui/gadgets/editors/editors.factor index ab385d48d0..a321640107 100644 --- a/basis/ui/gadgets/editors/editors.factor +++ b/basis/ui/gadgets/editors/editors.factor @@ -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 ; -- 2.34.1