home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1120 < prev    next >
Internet Message Format  |  1990-12-28  |  1KB

  1. From: dupuy@hudson.cs.columbia.edu (Alexander Dupuy)
  2. Newsgroups: alt.sources
  3. Subject: Fifth unofficial patch for LESS
  4. Message-ID: <9004022044.AA02118@hudson.cs.columbia.edu>
  5. Date: 2 Apr 90 20:44:42 GMT
  6.  
  7. A bug in less version 123 with less options "LESS=cw" causes empty lines not to
  8. be cleared properly for short files.  The following patch fixes this:
  9.  
  10. *** /tmp/,RCSt1a01884    Mon Apr  2 16:35:16 1990
  11. --- line.c    Mon Apr  2 16:33:18 1990
  12. ***************
  13. *** 557,568 ****
  14.            * If there is no current line, we pretend the line is
  15.            * either "~" or "", depending on the "twiddle" flag.
  16.            */
  17. !         if (twiddle)
  18. !             switch (i)
  19. !             {
  20. !             case 0:  return ('~');
  21. !             case 1:  return ('\n');
  22. !             }
  23.           return (0);
  24.       }
  25.   
  26. --- 557,572 ----
  27.            * If there is no current line, we pretend the line is
  28.            * either "~" or "", depending on the "twiddle" flag.
  29.            */
  30. !         switch (i)
  31. !         {
  32. !         case 0:
  33. !             if (twiddle)
  34. !                 return ('~');
  35. !             return ('\n');
  36. !         case 1:
  37. !             if (twiddle)
  38. !                 return ('\n');
  39. !         }
  40.           return (0);
  41.       }
  42.   
  43.  
  44. -- 
  45. inet: dupuy@cs.columbia.edu
  46. uucp: ...!rutgers!cs.columbia.edu!dupuy
  47.