This macro scans the current buffer for the longest line.
soft-wrap doesn't affect which line is the longest.
It also detects "hard wrap". In Tools > Options > File Options > Load "Wrap line length". In cases other than simple SBCS/DBCS buffers Slick will break really long lines into shorter lines.
This function can detect these lines and will correctly find the real longest line.
This is and enhancement of the code posted by Graeme: https://community.slickedit.com/index.php/topic,11383.msg48081.html#msg48081