Diff for /gforth/history.fs between versions 1.41 and 1.45

version 1.41, 2005/01/26 21:41:27 version 1.45, 2006/02/19 15:13:38
Line 1 Line 1
 \ command line edit and history support                 16oct94py  \ command line edit and history support                 16oct94py
   
 \ Copyright (C) 1995,2000,2003,2004 Free Software Foundation, Inc.  \ Copyright (C) 1995,2000,2003,2004,2005 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 69  s" os-class" environment? [IF] s" unix" Line 69  s" os-class" environment? [IF] s" unix"
   
 \ moving in history file                               16oct94py  \ moving in history file                               16oct94py
   
   defer back-restore ( u -- )
   ' backspaces is back-restore
   
 : clear-line ( max span addr pos1 -- max addr )  : clear-line ( max span addr pos1 -- max addr )
   backspaces over spaces swap backspaces ;    back-restore over spaces swap back-restore ;
   
 \ : clear-tib ( max span addr pos -- max 0 addr 0 false )  \ : clear-tib ( max span addr pos -- max 0 addr 0 false )
 \   clear-line 0 tuck dup ;  \   clear-line 0 tuck dup ;
Line 197  require utf-8.fs Line 200  require utf-8.fs
     restore-cursor 2dup type ;      restore-cursor 2dup type ;
 : .all ( span addr pos1 -- span addr pos1 )  : .all ( span addr pos1 -- span addr pos1 )
     restore-cursor >r 2dup swap type r> ;      restore-cursor >r 2dup swap type r> ;
   : xback-restore ( u -- )
       drop restore-cursor ;
   
   \ In the following, addr max is the buffer, addr span is the current
   \ string in the buffer, and pos1 is the cursor position in the buffer.
   
 : <xins>  ( max span addr pos1 xc -- max span addr pos2 )  : <xins>  ( max span addr pos1 xc -- max span addr pos2 )
     >r  2over r@ xc-size + u< IF  ( max span addr pos1 R:xc )      >r  2over r@ xc-size + u< IF  ( max span addr pos1 R:xc )
Line 274  require utf-8.fs Line 282  require utf-8.fs
     ['] xtab-expand  #tab   bindkey      ['] xtab-expand  #tab   bindkey
     ['] (xins)       IS insert-char      ['] (xins)       IS insert-char
     ['] kill-prefix  IS everychar      ['] kill-prefix  IS everychar
     ['] save-cursor  IS everyline ;      ['] save-cursor  IS everyline
       ['] xback-restore IS back-restore
   ;
   
 xchar-history  xchar-history
   
Line 300  xchar-history Line 310  xchar-history
 ;  ;
   
 : history-cold ( -- )  : history-cold ( -- )
     history-file get-history ;      history-file get-history xchar-history ;
   
 ' history-cold INIT8 chained  ' history-cold INIT8 chained
 history-cold  history-cold

Removed from v.1.41  
changed lines
  Added in v.1.45


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>