home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / TextEditors&Viewers / Texteditors / FFRED10.LHA / fpl / WordWrap.FPL < prev    next >
Encoding:
Text File  |  1994-09-22  |  512 b   |  22 lines

  1.  
  2. export int WordWrap_hook(string String)
  3. {
  4.   if(ReadInfo("wall_right") >= ReadInfo("column"))
  5.     return;
  6.   {
  7.     int line=ReadInfo("line");
  8.     int steps=CursorLeftWord();
  9.     if (line==ReadInfo("line") && ReadInfo("column")>1)
  10.       Output("\n");
  11.     CursorRight(steps);
  12.   }
  13.   if(ReadInfo("wall_right") <= ReadInfo("column"))
  14.     Output("\n");
  15. }
  16.  
  17. ConstructInfo("wordwrap", "", "", "WBL", "", 0, 0);
  18. ConstructInfo("wall_right", "", "", "WIL", "", 0, 999, 79);
  19.  
  20. HookPast("Output", "WordWrap_hook", "wordwrap");
  21.  
  22.