From 61401783932c065426d1f5d6f2354ab6b79c41a3 Mon Sep 17 00:00:00 2001 From: slava Date: Sat, 2 Dec 2006 21:44:18 +0000 Subject: [PATCH] Fix copy-into sig11 with negative start offset --- TODO.txt | 5 +++++ core/collections/sequence-combinators.factor | 1 + core/handbook/ui/tools.facts | 2 +- core/test/collections/sequences.factor | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/TODO.txt b/TODO.txt index b0e3c0db29..3dd477c54c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -3,9 +3,14 @@ - ui operations: restarts are broken - command buttons: indicate shortcuts - http://paste.lisp.org/display/30426 +- error popups obscure input area, and show redundant info (parse-error error.) +- also error popups should protect against error. throwing an exception +- operations which call parse are being run in the wrong namespace + 0.88: +- browser: tile titles should respond to right-clicks and/or have a + menu popup button - growable data heap - variable width word wrap - graphical crossref tool diff --git a/core/collections/sequence-combinators.factor b/core/collections/sequence-combinators.factor index 72f89837de..26ab7d8521 100644 --- a/core/collections/sequence-combinators.factor +++ b/core/collections/sequence-combinators.factor @@ -165,6 +165,7 @@ IN: sequences ] if ; inline : copy-into-check ( n dest src -- n dest src ) + pick 0 < [ >r bounds-error r> ] when pick over length + pick 2dup length > [ set-length ] [ 2drop ] if ; inline diff --git a/core/handbook/ui/tools.facts b/core/handbook/ui/tools.facts index c22b974449..e82113cb65 100644 --- a/core/handbook/ui/tools.facts +++ b/core/handbook/ui/tools.facts @@ -132,11 +132,11 @@ ARTICLE: "ui-tools" "UI development tools" $terpri "To take full advantage of the UI, you should be using a supported text editor, and load the correct editor integration module. See " { $link edit } "." { $subsection "ui-tool-tutorial" } -"All development tools are integrated into a single-window " { $emphasis "workspace" } "." { $subsection "ui-workspace-keys" } { $subsection "ui-presentations" } { $subsection "ui-completion" } { $heading "Tools" } +"All development tools are integrated into a single-window " { $emphasis "workspace" } "." { $subsection "ui-listener" } { $subsection "ui-browser" } { $subsection "ui-help" } diff --git a/core/test/collections/sequences.factor b/core/test/collections/sequences.factor index 2c153850ab..16e78ef5fb 100644 --- a/core/test/collections/sequences.factor +++ b/core/test/collections/sequences.factor @@ -82,6 +82,9 @@ unit-test [ [ 1 2 3 4 ] ] [ [ 1 2 3 ] [ 4 ] append ] unit-test [ [ 1 2 3 4 ] ] [ [ 1 2 3 ] { 4 } append ] unit-test +[ "a" -1 append ] unit-test-fails +[ -1 "a" append ] unit-test-fails + [ [ ] ] [ 1 [ ] remove ] unit-test [ [ ] ] [ 1 [ 1 ] remove ] unit-test [ [ 3 1 1 ] ] [ 2 [ 3 2 1 2 1 ] remove ] unit-test