takawiri: merge parts of the watchlist code update
FossilOrigin-Name: 6de219bd0b907e458cbdffc6fdeb89dce8fe70ae81c6f4e0ad24b02ef4487d78
This commit is contained in:
parent
c6d48d1f0b
commit
35f3a4d141
1 changed files with 15 additions and 11 deletions
|
@ -77,26 +77,30 @@ do something like:
|
|||
'Compiler &Compiler watch
|
||||
|
||||
~~~
|
||||
{ 'Add_Zero
|
||||
'Heap____
|
||||
'Compiler
|
||||
{ '________
|
||||
'________
|
||||
'________
|
||||
'________
|
||||
'________
|
||||
} 'WatchlistLabels d:create #5 , &, a:for-each
|
||||
|
||||
'Watchlist d:create #5 ,
|
||||
#0 ,
|
||||
&Heap ,
|
||||
&Compiler ,
|
||||
#5 allot
|
||||
'Watchlist d:create #5 , &Heap , #-1 , #-1 , #-1 , #-1 ,
|
||||
|
||||
:watchlist:find (a-n)
|
||||
dup &Watchlist a:contains? [ drop #-1 ] -if;
|
||||
&Watchlist swap a:index ;
|
||||
|
||||
:watch (sa-) s:keep drop-pair ;
|
||||
:unwatch (a-)
|
||||
watchlist:find dup n:positive? [ drop ] -if
|
||||
&Watchlist #-1 'abc 'acab reorder a:store ;
|
||||
|
||||
:watch (sa-) drop-pair ;
|
||||
:unwatch (a-) drop ;
|
||||
:watchlist (-)
|
||||
#19 #5 [ dup #84 vt:row,col
|
||||
dss:label &WatchlistLabels over #19 n:sub a:fetch s:put sp
|
||||
dss:value &Watchlist over #19 n:sub a:fetch
|
||||
fetch n:put n:inc vt:reset ] times drop ;
|
||||
dup n:positive? [ fetch ] [ drop #0 ] choose
|
||||
n:put n:inc vt:reset ] times drop ;
|
||||
~~~
|
||||
|
||||
# UI
|
||||
|
|
Loading…
Reference in a new issue