home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / utilities / zap / !Zap / 3rdParty / LineEdHelp < prev    next >
Encoding:
Text File  |  1994-03-19  |  11.9 KB  |  298 lines

  1. LineEditor Module release 2.50:
  2. ===============================
  3.  
  4. Source, binaries and documentation Copyright (C) Oliver Betts, 1994.
  5.  
  6. This software is provided as is - it has been tested to a reasonable extent,
  7. but probably has a few lurking bugs.  I take no responsibility for any loss
  8. or damage, directly or indirectly caused.
  9.  
  10. UNIX is a trademark of AT&T; 4DOS is a trademark of someone else.
  11. Incidentally, I highly recommend 4DOS if you have to use DOS.
  12.  
  13. This module started out as some modifications to version 2.30 of Richard K.
  14. Lloyd's LineEditor module, to make it work better with TaskWindows
  15. (specifically to use the same *FX4 and *FX 220-228 settings as the Wimp).
  16.  
  17. However, RKL seems not to respond to email or snail mail, and so not having
  18. his permission to release my modified version, I have entirely rewritten the
  19. module.  In doing so I have fixed a number of bugs which were in the original
  20. and added a few extra features, some of which were inspired by tcsh (for
  21. UNIX) and 4DOS (for DOS!).
  22.  
  23. I'm still actively working on this program, so watch out for new versions.
  24. Please let me know if you find any bugs or problems (read this file first
  25. though!).  I'll release the source with future versions.
  26.  
  27. For a list of the key bindings, load the module and type "*Help Editor".
  28.  
  29. Random note:  Ctrl-N is now mapped to Next-line (same as cursor down), so to
  30. turn paged scrolling on, you need to type Ctrl-Q Ctrl-N.  Similarly for
  31. some other useful Ctrl-<letter> combinations.  I'll probably add an option
  32. to allow these bindings to be turned off at some point.
  33.  
  34. A few comments on use with !Zap (see also !Zap's !Help file):
  35.  
  36. * To use function keys and Control + key you need to type Ctrl-Q first to
  37.   "Quote" the key - otherwise !Zap will process the key.  The cursor keys,
  38.   TAB and PageUp/PageDown are passed through and so don't need quoting.
  39.  
  40. * COPYing works - activated by the command COPY which is bound to COPY and
  41.   Shift-COPY by default.
  42.  
  43. * The TaskWindow module supplied with !Edit on RISC OS 2 Application Disc 1
  44.   (v 0.03) won't work with !Zap - you need the one supplied with the C/Asm
  45.   DDE (about 0.29) or above.  0.03 only works with !Edit 1.00 and not very
  46.   well.
  47.  
  48. Use with !Edit/!SrcEdit:
  49.  
  50. * !Edit TaskWindows don't "understand" the codes to move the cursor left
  51.   and right (&08 and &09) so things don't work terribly well.  Also, the
  52.   code for a beep (&07) is ignored, so failing filename completions don't
  53.   beep.
  54.  
  55. * My version and RKL's seem to work equally well/badly (simple recall and
  56.   filename completion work okay).
  57.  
  58. * I don't think it's possible to work around not having VDU 8 - get !Zap if
  59.   you want to use TaskWindows much - it's much faster too!
  60.  
  61. Use with RISC OS 2:
  62.  
  63. * I've added code to versions 2.34 and above to read the task handles of
  64.   TaskWindows under RISC OS 2, so local history buffers should now work.
  65.  
  66. * The TaskWindow modules supplied with RISC OS 2 and the Acorn C DDE (0.03
  67.   and 0.29 anyway) have a problem - if the LineEditor is loaded, closing a
  68.   TaskWindow doesn't release the memory allocated to the task.  This would
  69.   seem to be a TaskWindow bug [it occurs if you soft-load 0.03 or 0.29 with
  70.   RISC OS 3.1, and with RKL's version].  My best advice (other than to get
  71.   RISC OS 3.1) is to reduce the next slot before starting a TaskWindow and
  72.   not to close task windows that you might want again.
  73.  
  74. * There's a problem with the cursor keys producing symbols rather than being
  75.   interpreted as cursor keys with some setups under RISC OS 2.  This seems
  76.   to be the fault of the TaskWindow module again (v 0.29 anyway).
  77.  
  78. Comments and suggestions are greatly encouraged - email will get a reply (if
  79. I can get through), snail mail will eventually, but don't hold your breath. 
  80. If email bounces, I read the usenet group comp.sys.acorn regularly.  Please
  81. try to give as much detail as possible in bug-reports - steps to demonstrate
  82. the bug from loading in the module are very helpful indeed.
  83.  
  84. Files in this release:
  85.  
  86. !ReadMe    - this file
  87. LineEditor - the module
  88.  
  89. Thanks to Andy Hayward, David Moore and Dom Symes for testing and comments.
  90. Also to Clive Jones for suggesting how to find the current task's handle
  91. under RISC OS 2 (though his idea didn't work ;) ).
  92.  
  93. Olly Betts, 1994.03.20
  94.  
  95. Internet email:         olly@mantis.co.uk
  96.  
  97. Indirected snail mail:  Olly Betts,
  98.                         24 Morgans Road,
  99.                         Hertford,
  100.                         Herts,
  101.                         SG13 8BS,
  102.                         UK
  103.  
  104.  
  105. Improvements/bugfixes over RKL's 2.30:
  106. ======================================
  107.  
  108. More TaskWindow compatible:
  109. ---------------------------
  110.  
  111. Changed to use same *FX4 and *FX 220-228 settings as Wimp, so using the
  112. line editor in a TaskWindow doesn't screw up the cursor keys.
  113.  
  114. More values are stored in registers or blocks rather than absolute locations,
  115. which greatly improves behaviour with multiple TaskWindows.
  116.  
  117. Each TaskWindow now has a separate currently-recalled-line pointer.  If
  118. Global history is on, when lines are deleted (by Shift-Insert, or when the
  119. history buffer gets full), the pointers for each TaskWindow are adjusted
  120. appropriately.
  121.  
  122. Function keys work separately in each TaskWindow.
  123.  
  124. You can't *RMKill the LineEditor module while a line is being entered.
  125.  
  126. Miscellaneous bugs fixed:
  127. -------------------------
  128.  
  129. Ctrl-H performs backspace (RKL's interprets it as Ctrl-Delete and erases
  130. the history).
  131.  
  132. R12 wasn't passed to readlinev - RKL had just hacked around this...
  133.  
  134. Backspace in overtype mode didn't delete characters on the screen.
  135.  
  136. RKL's gave incorrect underline cursor in non-BBC gap modes (eg MODE 17).
  137.  
  138. Escape now moves cursor to end of line before exiting.
  139.  
  140. You can now enter all top-bit-set characters; Eg With RKL's version, you
  141. can't enter LOAD"Ý" (to type "Ý" hold down ALT and type 221 on the numeric
  142. keypad, then release ALT - RKL's reads it as Shift-Insert).
  143.  
  144. Filename completion code now copes with DOSFS leafnames (eg AUTOEXEC/BAT)
  145. (maximum leafname length increased from 11 to 15 chars).
  146.  
  147. RKL's used CMOS locations 37 and 38, but his !Trash also uses 38 - currently
  148. I only use 6 bits of 37.
  149.  
  150. Other changes which I view as improvements:
  151. -------------------------------------------
  152.  
  153. You can now have separate history buffers for each TaskWindow (controlled by
  154. bit 0 of *Configure EdFlags).  Ctrl-Delete wipes *current* history buffer;
  155. *EraseHistory and Shift-Ctrl-Delete wipe *all* history buffers.  When in
  156. local buffer mode, *Recall and *EdStatus put a '*' by the last used buffer.
  157. If the command was typed in using OS_ReadLine, this will be the "current"
  158. buffer, but results may be less meaningful if the command is executed by a
  159. program.
  160.  
  161. Added PageUp/PageDown to scroll through lines with start matching entered
  162. line (also on shift-cursor-up/down) [like Instigator and cursor up/down on
  163. 4DOS].
  164.  
  165. Added Emacs-like bindings [some are from tcsh]:
  166. Duplicating existing keys:
  167.  ^A ^E start/end of line ^B ^F cursor left/right ^N ^P next/prev line
  168.  ^D delete right
  169. New actions:
  170.  ^Q quote next key, ^T transpose, ^K delete to end of line
  171.  ^@ place mark, ^X exchange cursor and mark (Emacs ^X ^X), ^W delete region
  172.  
  173. Added another style of filename completion (like 4DOS).  Shift-Tab completes
  174. fully on first match, then Shift-Tab and Ctrl-Shift-Tab step through other
  175. matches.
  176.  
  177. Removed nasty hacky "Supervisor awareness" as it didn't work for RO 3.x or
  178. at ShellCLI prompt (f12 from desktop). Replaced with better system (for
  179. Acc.Fred[Tab] it looks first for "Acc.Fred*"; if that fails it then looks
  180. for "Fred*" [on the assumption that Acc. is an abbreviated *-command]).
  181.  
  182. There is no limit on the number of lines in the history buffer, only on the
  183. size of the buffer.
  184.  
  185. Doesn't display copyright message on start-up and reset.
  186.  
  187. Syntax messages added for commands.
  188.  
  189. Code doesn't bother trying to change cursor shape in TaskWindows (as VDU
  190. sequences are ignored and only slow things up more).
  191.  
  192. The code is "lazier" about inserting and deleting characters during filename
  193. completion - this gives a slight speed increase in TaskWindows.
  194.  
  195. My completion code doesn't insert delete characters into the keyboard buffer,
  196. which might have caused problems if you pressed Shift or Ctrl at just the
  197. wrong moment.
  198.  
  199. Module help messages compacted using OS dictionary.
  200.  
  201. Ctrl-L & HOME now redraw current line (bit like tcsh).
  202.  
  203. ^J still behaves like RETURN but doesn't store line in history.
  204.  
  205. Doesn't do *Unset LineEditor$Dir (was done incorrectly for *EraseHistory for
  206. example).
  207.  
  208. No swi-padding code as it is *not* needed (slightly faster and smaller).
  209.  
  210. Added option to assemble with less verbose help text.
  211.  
  212.  
  213. Shortfalls compared to RKL's version:
  214. =====================================
  215.  
  216. Changes to *Configure EdSize don't affect existing history buffer(s), but are
  217. used for new buffers.  I'm not sure if this is actually a shortfall or a
  218. useful feature - may be fixed.
  219.  
  220. No wimp frontend (or is that an improvement?) - seriously, let me know if
  221. you think a Wimp frontend is needed - I might write one if it's wanted...
  222.  
  223. Hasn't been tested with Arthur (the Archimedes OS before RISC OS) - I see no
  224. reason why it shouldn't work, but this is programming...
  225.  
  226. Minor "feature" - *FX216,0 no longer stops current function key expansion
  227. during OS_ReadLine, but this is no big deal really - it could be solved by
  228. intersecting OS_Byte, but I can't see much point.
  229.  
  230.  
  231. Possible future additional features:
  232. ====================================
  233.  
  234. Allocate filename completion buffers on-the-fly which'll remove a few
  235. lingering potential reentrancy problems and allow us to cope with arbitrarily
  236. long leafnames.
  237.  
  238. Doesn't work wonderfully in VDU5 mode [neither does RKL's] - maybe fix.
  239.  
  240. More *Conf. options, for example:
  241.  overtype on by default?
  242.  redisplay on ^L, Home, etc
  243.  
  244. Add Yank, Delete word and other actions.
  245.  
  246. Maybe allow user-defined key bindings.
  247.  
  248. Maybe add Ctrl-Page-Up/Down to scroll case sensitive.
  249.  
  250. Add completion of *-commands? (those implemented by modules through the table
  251. pointed to by the header - can't deal with anyone intercepting `Unknown
  252. *-command'.  This usage is deprecated by the PRMs, but I think Econet has to
  253. use it for *Pass, etc).  We can also cope with aliases (look at Alias$*) and
  254. files on Run$Path.
  255.  
  256. Maybe change the name (?)
  257.  
  258. If we allow the size of existing buffers to change, we should preserve as
  259. much of the history as will fit in new size buffer.
  260.  
  261. As with RKL's, you can recall lines which have characters in which are
  262. outside the range specified by R2 and R3 on entry to OS_ReadLine - the only
  263. solutions I can see are to strip them out (not wonderful) or to only allow
  264. recall if all chars in the range &20-&FF are allowed (this applies to
  265. ShellCLI, BASIC, and GOS (TaskWindows)).  The problem also applies to
  266. filename completion.  Ideas on this one are especially welcome.
  267.  
  268.  
  269. Revision History:
  270. =================
  271.  
  272. 2.50 Pressing Tab/^I on an empty line incorrectly moved the cursor left one
  273.       character if a completion occured
  274.      Deleting left at the end of a recalled line didn't set the modified flag
  275.      With empty history, typing something and pressing PageUp recalled crap
  276.      Added 4DOS style filename completion:  Shift-Tab completes fully, then
  277.       steps thru' completions - Shift-Ctrl-Tab steps backwards
  278.      Shift-Copy does the same as Copy (to match !Zap defaults)
  279.      Updated and tidied output from *Help Editor
  280.  
  281. 2.40 Tidied up a little for release with !Zap 1.10
  282.  
  283. 2.35 TaskWindow tracking workspace if now freed on soft-reset
  284.      If a claim for RMA fails, a beep is emitted and something sensible done
  285.       (start-up gives an error, a function key is ignored, starting a new
  286.       TaskWindow reverts to the default OS_ReadLine routine)
  287.      Fixed minor bug in filename expansion code (introduced in 2.34)
  288.      PageUp and PageDown now don't insert start line into the history
  289.  
  290. 2.34 Fixed minor bug in filename completion code
  291.      Added code to find task handle for RISC OS 2 (easier than I thought)
  292.      Now marks "current" buffer with a '*' in *Recall and *EdStatus if
  293.       local history is in operation
  294.      Recoded filename completion to enter characters directly, rather than
  295.       via keyboard buffer
  296.  
  297. 2.33 First beta release
  298.