Rename editor-caret* and editor-mark* without the * since we don't have the old accessors anymore

db4
Slava Pestov 2009-01-15 15:50:48 -06:00
parent 0bcc9b4123
commit 2bb6d7f6b1
3 changed files with 9 additions and 9 deletions

View File

@ -20,13 +20,13 @@ HELP: <editor>
{ $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." } ;
@ -66,8 +66,8 @@ HELP: set-editor-string
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 }

View File

@ -115,7 +115,7 @@ IN: ui.tools.listener.tests
[ t ] [
"i" get model>> doc-end
"i" get editor-caret* =
"i" get editor-caret =
] unit-test
! Race condition discovered by SimonRC

View File

@ -57,7 +57,7 @@ completion-popup ;
[ { 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 )
@ -467,7 +467,7 @@ M: completion-popup hide-glass-hook
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
@ -503,7 +503,7 @@ CONSTANT: completion-popup-offset { -4 0 }
: (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+ ;