Fix a compiler bug, keypad ENTER now inserts a newline

slava 2006-09-05 23:02:34 +00:00
parent 44553a4b20
commit 8249adc3f6
3 changed files with 10 additions and 8 deletions

View File

@ -1,11 +1,7 @@
+ 0.85:
- ENTER key on keypad should do something
- pane output in UI should use less memory
- signal 4 on datastack underflow on mac intel??
- why is a 'null' type inferred for the output of foo in
: foo f ;
: bar foo 4 4 = and ;
- faster I/O
- buffer-ptr should be an alien
- faster Unix stream-read#

View File

@ -155,7 +155,8 @@ DEFER: (infer-classes)
] 2each ;
: merge-value-class ( # nodes -- class )
[ swap node-class# ] map-with null [ class-or ] reduce ;
[ swap node-class# ] map-with
null [ class-or ] reduce ;
: annotate-merge ( nodes values -- )
dup length
@ -164,9 +165,13 @@ DEFER: (infer-classes)
: merge-children ( node -- )
dup node-successor dup #merge? [
node-out-d <reversed>
>r node-children [ last-node ] map r>
annotate-merge
over node-children empty? [
2drop
] [
node-out-d <reversed>
>r node-children [ last-node ] map r>
annotate-merge
] if
] [
2drop
] if ;

View File

@ -71,6 +71,7 @@ editor {
"Editing"
{ "Insert newline" T{ key-down f f "RETURN" } [ "\n" swap user-input ] }
{ "Insert newline" T{ key-down f { S+ } "RETURN" } [ "\n" swap user-input ] }
{ "Insert newline" T{ key-down f "ENTER" } [ "\n" swap user-input ] }
{ "Delete next character" T{ key-down f f "DELETE" } [ T{ char-elt } editor-delete ] }
{ "Delete previous character" T{ key-down f f "BACKSPACE" } [ T{ char-elt } editor-backspace ] }
{ "Delete previous word" T{ key-down f { C+ } "DELETE" } [ T{ word-elt } editor-delete ] }