mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
editor: display now tries to keep more context on screen
FossilOrigin-Name: d9250fbf1914d144e7840d7bbdeb78692101f2ff08c6e49a6fc571e6dcbce161
This commit is contained in:
parent
a445f95e36
commit
4b6ee00672
1 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ advance to the currently selected line.
|
|||
#0 @SourceFile [ drop n:inc ] file:for-each-line dup !LineCount ;
|
||||
|
||||
:skip-to
|
||||
@CurrentLine #0 n:max [ @FID file:read-line drop ] times ;
|
||||
@CurrentLine MAX-LINES #2 / - #0 n:max [ @FID file:read-line drop ] times ;
|
||||
~~~
|
||||
|
||||
Now for words to format the output. This should all be pretty clear in
|
||||
|
@ -124,7 +124,7 @@ The indicator is an asterisk, and visually marks the current line.
|
|||
:display (-)
|
||||
@SourceFile file:R file:open !FID
|
||||
clear-display header ---- skip-to
|
||||
@CurrentLine count-lines MAX-LINES n:min [ display-line ] times drop
|
||||
@CurrentLine MAX-LINES #2 / - #0 n:max count-lines MAX-LINES n:min [ display-line ] times drop
|
||||
---- dump-stack
|
||||
@FID file:close ;
|
||||
~~~
|
||||
|
|
Loading…
Reference in a new issue