Merge branch 'master' of git://factorcode.org/git/factor
commit
23bc830e58
|
@ -3,7 +3,7 @@
|
|||
USING: kernel.private ;
|
||||
IN: kernel
|
||||
|
||||
: version ( -- str ) "0.91" ; foldable
|
||||
: version ( -- str ) "0.92" ; foldable
|
||||
|
||||
! Stack stuff
|
||||
: roll ( x y z t -- y z t x ) >r rot r> swap ; inline
|
||||
|
|
|
@ -195,11 +195,11 @@ TUPLE: one-word-elt ;
|
|||
|
||||
M: one-word-elt prev-elt
|
||||
drop
|
||||
[ [ f -rot >r 1- r> (prev-word) ] (word-elt) ] (prev-char) ;
|
||||
[ f -rot >r 1- r> (prev-word) ] (word-elt) ;
|
||||
|
||||
M: one-word-elt next-elt
|
||||
drop
|
||||
[ [ f -rot (next-word) ] (word-elt) ] (next-char) ;
|
||||
[ f -rot (next-word) ] (word-elt) ;
|
||||
|
||||
TUPLE: word-elt ;
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
USING: tools.deploy.config ;
|
||||
H{
|
||||
{ deploy-compiler? t }
|
||||
{ deploy-word-props? f }
|
||||
{ deploy-ui? t }
|
||||
{ deploy-reflection 1 }
|
||||
{ deploy-name "springies.models.2x2snake" }
|
||||
{ deploy-c-types? f }
|
||||
{ deploy-word-defs? f }
|
||||
{ "stop-after-last-window?" t }
|
||||
{ deploy-math? t }
|
||||
{ deploy-io 1 }
|
||||
}
|
|
@ -30,6 +30,16 @@ tools.test.inference tools.test.ui models ;
|
|||
] with-grafted-gadget
|
||||
] unit-test
|
||||
|
||||
[ "bar" ] [
|
||||
<editor> "editor" set
|
||||
"editor" get [
|
||||
"bar\nbaz quux" "editor" get set-editor-string
|
||||
{ 0 3 } "editor" get editor-caret set-model
|
||||
"editor" get select-word
|
||||
"editor" get gadget-selection
|
||||
] with-grafted-gadget
|
||||
] unit-test
|
||||
|
||||
{ 0 1 } [ <editor> ] unit-test-effect
|
||||
|
||||
"hello" <model> <field> "field" set
|
||||
|
|
|
@ -320,11 +320,6 @@ M: editor gadget-text* editor-string % ;
|
|||
|
||||
: end-of-document ( editor -- ) T{ doc-elt } editor-next ;
|
||||
|
||||
: selected-word ( editor -- string )
|
||||
dup gadget-selection? [
|
||||
dup T{ one-word-elt } select-elt
|
||||
] unless gadget-selection ;
|
||||
|
||||
: position-caret ( editor -- )
|
||||
mouse-elt dup T{ one-char-elt } =
|
||||
[ drop dup extend-selection dup editor-mark click-loc ]
|
||||
|
@ -408,6 +403,11 @@ editor "caret-motion" f {
|
|||
|
||||
: select-word T{ one-word-elt } select-elt ;
|
||||
|
||||
: selected-word ( editor -- string )
|
||||
dup gadget-selection?
|
||||
[ dup select-word ] unless
|
||||
gadget-selection ;
|
||||
|
||||
: select-previous-character T{ char-elt } editor-select-prev ;
|
||||
|
||||
: select-next-character T{ char-elt } editor-select-next ;
|
||||
|
|
|
@ -2,16 +2,18 @@ source misc/version.sh
|
|||
|
||||
TARGET=$1
|
||||
|
||||
if [ "$TARGET" = "x86" ]; then
|
||||
if [ "$1" = "x86" ]; then
|
||||
CPU="x86.32"
|
||||
TARGET=macosx-x86-32
|
||||
else
|
||||
CPU="macosx-ppc"
|
||||
TARGET=macosx-ppc
|
||||
fi
|
||||
|
||||
BOOT_IMAGE=boot.$CPU.image
|
||||
wget http://factorcode.org/images/$VERSION/$BOOT_IMAGE
|
||||
|
||||
make macosx-$TARGET
|
||||
make $TARGET
|
||||
Factor.app/Contents/MacOS/factor -i=$BOOT_IMAGE -no-user-init
|
||||
|
||||
DISK_IMAGE_DIR=Factor-$VERSION
|
||||
|
@ -29,5 +31,5 @@ find core extra fonts misc unmaintained -type f \
|
|||
hdiutil create -srcfolder "$DISK_IMAGE_DIR" -fs HFS+ \
|
||||
-volname "$DISK_IMAGE_DIR" "$DISK_IMAGE"
|
||||
|
||||
ssh mkdir -p linode:w/downloads/$VERSION/
|
||||
ssh linode mkdir -p w/downloads/$VERSION/
|
||||
scp $DISK_IMAGE linode:w/downloads/$VERSION/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
source misc/version.sh
|
||||
rm -rf .git
|
||||
cd ..
|
||||
tar cfz Factor-$VERSION.tgz factor/
|
||||
tar cfz Factor-$VERSION.tar.gz factor/
|
||||
|
||||
ssh mkdir -p linode:w/downloads/$VERSION/
|
||||
scp Factor-$VERSION.tgz linode:w/downloads/$VERSION/
|
||||
ssh linode mkdir -p w/downloads/$VERSION/
|
||||
scp Factor-$VERSION.tar.gz linode:w/downloads/$VERSION/
|
||||
|
|
|
@ -1 +1 @@
|
|||
export VERSION=0.91
|
||||
export VERSION=0.92
|
||||
|
|
|
@ -22,5 +22,10 @@ rm -f Makefile
|
|||
rm -f cp_dir
|
||||
rm -f boot.*.image
|
||||
|
||||
FILE=Factor-$VERSION-win32-$CPU.zip
|
||||
|
||||
cd ..
|
||||
zip -r Factor-$VERSION-win32-$CPU.zip Factor/
|
||||
zip -r $FILE Factor/
|
||||
|
||||
ssh linode mkdir -p w/downloads/$VERSION/
|
||||
scp $FILE linode:w/downloads/$VERSION/
|
||||
|
|
Loading…
Reference in New Issue