{ $values { "editor" "a new " { $link editor } } }
{ $description "Creates a new " { $link editor } " with an empty document." } ;
-{ editor-caret* editor-mark* } related-words
+{ editor-caret editor-mark } related-words
-HELP: editor-caret*
+HELP: editor-caret
{ $values { "editor" editor } { "loc" "a pair of integers" } }
{ $description "Outputs the current caret location as a line/column number pair." } ;
-HELP: editor-mark*
+HELP: editor-mark
{ $values { "editor" editor } { "loc" "a pair of integers" } }
{ $description "Outputs the current mark location as a line/column number pair." } ;
ARTICLE: "gadgets-editors-selection" "The caret and mark"
"If there is no selection, the caret and the mark are at the same location; otherwise the mark delimits the end-point of the selection opposite the caret."
-{ $subsection editor-caret* }
-{ $subsection editor-mark* }
+{ $subsection editor-caret }
+{ $subsection editor-mark }
{ $subsection change-caret }
{ $subsection change-caret&mark }
{ $subsection mark>caret }
[ { 0 0 } ] 2dip doc-range ;
: vocab-completion? ( interactor -- ? )
- [ editor-caret* ] [ model>> ] bi up-to-caret " \r\n" split
+ [ editor-caret ] [ model>> ] bi up-to-caret " \r\n" split
{ [ complete-IN:/USE:? ] [ complete-USING:? ] } 1|| ;
: <word-model> ( interactor -- model )
find-world hide-glass ;
: completion-loc/doc ( popup -- loc doc )
- interactor>> [ editor-caret* ] [ model>> ] bi ;
+ interactor>> [ editor-caret ] [ model>> ] bi ;
: accept-completion ( item table -- )
find-completion-popup
: (completion-popup-loc) ( interactor element -- loc )
[ drop screen-loc ] [
- [ [ [ editor-caret* ] [ model>> ] bi ] dip prev-elt ] [ drop ] 2bi
+ [ [ [ editor-caret ] [ model>> ] bi ] dip prev-elt ] [ drop ] 2bi
loc>point
] 2bi v+ completion-popup-offset v+ ;