Page 1 of 1
Whitespace not ignored
Posted: Thu May 10, 2007 2:59 pm
by lhuisingh
I am using EDP 3.5.1.0. It appears that when I compare two blocks of text where one version has an extra blank line as well as other changes, that the blank line is not being ignored ("All white space in lines" and "Blank lines" are checked) if there are spaces on the "blank" line. The version in "Text2" has spaces on the blank line.
Text1
Code: Select all
plRetVal = CancelPipeIo(bRW)
If (plRetVal = 0) Then ' Terminate timed-out I/O request
plDLLError = Err.LastDllError
Call LRHLog("CancelPipeIo error", plDLLError)
Text2
Code: Select all
m_lngCancelIOReturnValue = CancelPipeIo(bREAD_OR_WRITE)
If (m_lngCancelIOReturnValue = 0) Then ' Terminate timed-out I/O request
m_lngDLLError = Err.LastDllError
Call LRHLog("CancelPipeIo error", m_lngDLLError)
The "If" in the line following the blank line is flagged as a difference where I didn't expect it to be given I want to ignore whitespace. Is this enough info state the problem?
Posted: Thu May 10, 2007 6:42 pm
by psguru
The "If" lines are not identical so they are not matched. But even if they were, as long as an ignored line is a part of a diff block, it's not going to break it into two smaller blocks. To make sure that the blank line is indeed ignored enable "Use Ignored color in diff bloc&ks" option under Options | Misc.
Posted: Fri May 11, 2007 7:34 am
by lhuisingh
Even though the whole "If" line wan't identical, why wasn't at least the word "If" matched? In the example, it appears that left-side line starting with "plDLLError" is being compared against the "If" line on the right.
I guess I was assuming there would be a non-numbered line added to the left side to help the "If" lines match up. It appears that it only does that if the line that follows and/or precedes a blank line is an exact match. Is that correct?
To test this theory I copied the exact text from Text1 and added a blank line with spaces so that the only difference was the blank line with spaces. In this case it did what I expected by adding a non-numbered blank line on the left side to match up with the new blank line on the right. I guess I expected this behavior even if the lines preceding or following the blank line were different - truly ignoring the blank line as if it wasn't there.
Posted: Fri May 11, 2007 5:39 pm
by psguru
Only identical lines are aligned. In 3.5 you now have a way to manually synchronize lines -- see View | Synchronizing Splitter.
Posted: Mon May 14, 2007 6:45 am
by lhuisingh
I wondered. Thanks.
I have been using the manual synchronization quite heavily once I finally learned how to do it. Thanks for this feature. It really helps in a lot of situations. The only thing I would suggest is a simpler way to accurately select a line on the left side in the process of synchronizing two files. I find it difficult to accurately click in the left column of the synchronization splitter for the desired line, especially while I have the EDP window across two monitors. I have wound up going right-to-left since when I get to the left side, the lines are outlined as I move the mouse so I can pick the correct line. I know the first side's line is outlined but once you click you can't change the line without starting over. Perhaps something like that where the program outlines the source line when you first click in a synchronization column but as long as you didn't go into the other side you can change which starting line you will use.
Posted: Mon May 14, 2007 6:31 pm
by psguru
Yes, right-to-left linking is certainly easier to achieve. Also note that you can drag existing links in case you didn't get one right. This is especially useful if you turn off the Auto Re-Compare options.