Status Line

parent 8f78c629
Pipeline #1246 passed with stage
in 10 minutes and 42 seconds
......@@ -32,6 +32,7 @@
: .scanning ( -- )
." scanning for [THEN]" cr ;
Defer .unstatus ' noop is .unstatus
:noname ( in 1 -- ) 1 <> -12 and throw >in ! ;
\ restore-input
......@@ -41,6 +42,7 @@
[ has? file [IF] ] stdin file-eof? IF false EXIT THEN [ [THEN] ]
scanning? IF ['] .scanning warning-color color-execute THEN
tib max#tib @ accept #tib !
.unstatus
input-start-line true 1 loadline +! ; \ refill
:noname ( -- addr u ) tib #tib @ ; \ source
......
......@@ -944,7 +944,7 @@ Defer 'cold ( -- ) \ gforth tick-cold
has? os [IF]
: bye ( -- ) \ tools-ext
[ has? file [IF] ]
script? 0= IF cr THEN
script? 0= IF .unstatus cr THEN
[ [ELSE] ]
cr
[ [THEN] ]
......
......@@ -19,14 +19,23 @@
\ along with this program. If not, see http://www.gnu.org/licenses/.
blue >bg white >fg or bold or Value status-attr
: redraw-status ( addr u -- )
.\" \e7"
0 rows 2 - at-xy cols 2* spaces .\" \e[A\n"
status-attr attr! type default-color attr!
.\" \e8" ;
: .unstatus-line ( -- )
.\" \e7"
0 rows 1 - at-xy cols spaces
.\" \e8" ;
: .status-line ( -- ) { | w^ status$ }
base @
[: ." gforth 😷 | " unused u.
." free | order: " order
[: ." gforth 😷 | " unused 1024 / 0 u.r
." k free | order: " order
." | base=" .
." | " depth 0= IF ." ∅" ELSE ... THEN ;]
[: ." gforth 😷 | " unused u.
." f|o " order
[: ." gforth 😷 | " unused 1024 / 0 u.r
." k free|o " order
." |b=" 0 .r
." | " depth 0= IF ." ∅" ELSE ... THEN ;]
cols 100 > select
......@@ -42,10 +51,10 @@ blue >bg white >fg or bold or Value status-attr
r> I - +LOOP drop
THEN
THEN
.\" \n\n\e[2A\e7"
0 rows 2 - at-xy cols spaces cr
status-attr attr! status$ $. default-color attr!
.\" \e8"
.\" \n\n\e[2A" status$ $@ redraw-status
status$ $free ;
' .status-line is .status
: +status ['] .status-line is .status ['] .unstatus-line is .unstatus ;
: -status ['] noop is .status ['] noop is .unstatus ;
+status
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment