home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / editors / 2022 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  1.5 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!mks.com!ant
  2. From: ant@mks.com (Anthony Howe)
  3. Newsgroups: comp.editors
  4. Subject: Q: Line # addressing using buffer gap.
  5. Keywords: Finseth, Craft, Of, Text, Editing, buffer, gap
  6. Message-ID: <1992Aug18.132755.25619@mks.com>
  7. Date: 18 Aug 92 13:27:55 GMT
  8. Organization: Mortice Kern Systems Inc., Waterloo, Ontario, CANADA
  9. Lines: 26
  10.  
  11.  
  12. Is there a reasonably fast technique, given a Buffer Gap structure,
  13. for finding line number X.  Currently, AE, just performs linear scans
  14. for <newline> marks when performing cursor motion, since the
  15. assumption is that the majority of movement is localized.
  16.  
  17. Being able to find the start of a line quickly would help in
  18. implementing a Goto-Line command and possibly a better screen update
  19. manager.
  20.  
  21. I think I read somewhere about the idea of keeping a table of buffer
  22. indexes that correspond to each line.  Then as you insert or delete
  23. characters in a given line, all the indexes above line X would need to
  24. be updated.  This idea strikes me as being very ugly since the time to
  25. update the indexes is dependant on which line you are currently at.
  26. If you were at the end of the file, this would be very quick, but if
  27. you were at the beginning of the file, this time maybe unacceptable
  28. for large files.
  29.  
  30. Ideas anyone?
  31.  
  32. -ant
  33. -- 
  34. ant@mks.com                                                   Anthony C Howe 
  35. Mortice Kern Systems Inc. 35 King St. N., Waterloo, Ontario, Canada, N2J 6W9
  36. "Nice legs.  For a human that is." - Worf (Q-pid)
  37.