X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/blobdiff_plain/6b91cb54fc7dec367c57b4d9e97f2a086b809ea6..922f2e38fe5332fae47d11af0473e9662c4b09fb:/fth/history.fth diff --git a/fth/history.fth b/fth/history.fth index 5e5409e..6299d1d 100644 --- a/fth/history.fth +++ b/fth/history.fth @@ -51,6 +51,8 @@ KH-HISTORY kh_history_size erase \ The most recent entry is put at the beginning, \ older entries are shifted up. +4 constant KH_LINE_EXTRA_SIZE ( 2 count bytes plus 2 size bytes ) + : KH-END ( -- addr , end of history buffer ) kh-history kh_history_size + ; @@ -132,7 +134,9 @@ variable KH-INSIDE ( true if we are scrolling inside the history buffer ) >r ( save count ) \ Set look pointer to point to first count byte of last string. 0 kh-look ! - r@ cell+ kh.make.room +\ Make room for this line of text and line header. +\ PLB20100823 Was cell+ which broke on 64-bit code. + r@ KH_LINE_EXTRA_SIZE + kh.make.room \ Set count bytes at beginning and end. r@ kh-history c! ( start count ) r@ kh.endcount.addr c! @@ -498,7 +502,7 @@ variable KH-INSIDE ( true if we are scrolling inside the history buffer ) ; : AUTO.TERM history.off - auto.init + auto.term ; if.forgotten history.off