From: Dirk B. <db...@us...> - 2006-09-24 08:29:36
|
Update of /cvsroot/win32forth/win32forth-stc/src/console In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8651/src/console Modified Files: LINEEDIT.F Log Message: Fixed a bug in the LineEditor Index: LINEEDIT.F =================================================================== RCS file: /cvsroot/win32forth/win32forth-stc/src/console/LINEEDIT.F,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LINEEDIT.F 23 Sep 2006 10:18:34 -0000 1.1 --- LINEEDIT.F 24 Sep 2006 08:29:32 -0000 1.2 *************** *** 72,76 **** )) - \ only forth also definitions anew -lineedit.f --- 72,75 ---- *************** *** 78,82 **** INTERNAL \ internal words start here - EXTERNAL --- 77,80 ---- *************** *** 98,104 **** MAXCOUNTED constant maxedit ! create editbuf MAXSTRING allot \ our edit buffer, ! editbuf off \ 255 characters max ! 0 value editpos \ current edit position in buffer : _legetxy ( --- x ~y ) \ Negative y indicates buffer coordinates --- 96,102 ---- MAXCOUNTED constant maxedit ! create editbuf maxedit 2 + allot \ our edit buffer, 255 characters max ! editbuf maxedit 2 + erase ! 0 value editpos \ current edit position in buffer : _legetxy ( --- x ~y ) \ Negative y indicates buffer coordinates *************** *** 143,147 **** then insertmode ! if editbuf 1+ editpos + dup 1+ maxedit editpos - move editbuf c@ 1+ lenlimit min editbuf c! --- 141,146 ---- then insertmode ! if ! editbuf 1+ editpos + dup 1+ maxedit editpos - move editbuf c@ 1+ lenlimit min editbuf c! *************** *** 275,334 **** create control-tab ! ' noop , ! ' _le-lword , ! ' noop , ! ' _le-pgdn , ! ' _le-right , ! ' _le-up , ! ' _le-rword , ! ' _le-fdel , ! ' _le-bdel , ! ' _le-tab , ! ' _le-LF , ! ' noop , ! ' noop , ! ' _le-ret , ! ' noop , ! ' noop , ! ' noop , ! ' noop , ! ' _le-pgup , ! ' _le-left , ! ' _le-wdel , ! ' noop , ! ' _le-ins , ! ' noop , ! ' _le-down , ! ' _le-ldel , ! ' noop , ! ' _le-quit , ! ' noop , ! ' noop , ! ' noop , ! ' noop , : ?control ( --- ) \ handle control characters ! lchar bl < ! if false to autoclear \ no auto clear now ! ! \ temp changed: because EXEC: must be ported first ! (( ! lchar exec: ! \ 0 null 1 a 2 b 3 c 4 d 5 e 6 f ! noop _le-lword noop _le-pgdn _le-right _le-up _le-rword ! \ 7 g 8 h 9 i LF 11 k 12 l Enter ! _le-fdel _le-bdel _le-tab _le-LF noop noop _le-ret ! \ 14 n 15 o 16 p 17 q 18 r 19 s 20 t ! noop noop noop noop _le-pgup _le-left _le-wdel ! \ 21 u 22 v 23 w 24 x 25 y 26 z Esc ! noop _le-ins noop _le-down _le-ldel noop _le-quit ! \ 28 \ 29 ] 30 ^ 31 _ ! noop noop noop noop ! )) ! lchar cells control-tab + @ execute ! ! then ; ! ! : ?func ( --- ) \ handle function keys --- 274,290 ---- create control-tab ! ' noop , ' _le-lword , ' noop , ' _le-pgdn , ' _le-right , ! ' _le-up , ' _le-rword , ' _le-fdel , ' _le-bdel , ' _le-tab , ! ' _le-LF , ' noop , ' noop , ' _le-ret , ' noop , ! ' noop , ' noop , ' noop , ' _le-pgup , ' _le-left , ! ' _le-wdel , ' noop , ' _le-ins , ' noop , ' _le-down , ! ' _le-ldel , ' noop , ' _le-quit , ' noop , ' noop , ! ' noop , ' noop , : ?control ( --- ) \ handle control characters ! lchar bl < ! if false to autoclear \ no auto clear now ! lchar cells control-tab + @ execute ! then ; : ?func ( --- ) \ handle function keys *************** *** 388,392 **** to ledit-y to ledit-x \ save origin - false to insertmode _le-ins _le-ins false to ?ldone --- 344,347 ---- |