SlickEdit Community

General => Community Forum => Topic started by: ehersh on August 04, 2017, 07:55:12 pm

Title: line length
Post by: ehersh on August 04, 2017, 07:55:12 pm
Hello, we currently have to find bad characters in certain files by scrolling down the right side of the file, look for any CR/LF out of alignment and correct. Is there anyway to set up slick edit to list all of the lines longer than say 1690? Once we go to the correct line it is an easy matter to find the issue and correct.
Title: Re: line length
Post by: Graeme on August 04, 2017, 11:29:36 pm
This macro takes you to the longest line in the file,15130.msg57461.html (,15130.msg57461.html)

The macro below scans forward from the current line until it finds a line longer than an entered value.  It's not exactly what you want but you can probably hack it around if you want.

Code: [Select]
#include ""
_command void mll() name_info(',')
   _str maxl;
   if ( get_string(maxl, 'enter max length') ) {
   int mm = (int)maxl;
   for ( ;; ) {
      if ( down() ) {
      if ( p_col > mm ) {