Compare Plugin - Unable to turn off Synchronize Vertical Scrolling Version 7.6.6 with Compare V2



  • Prior to Update to V7.6.6 I had the Ability to Uncheck the
    View -> Synchronize Vertical Scrolling and it would Turn Off.
    Now appears to have no effect.
    The Toggle of the Synchronize Horizontal Scrolling does still work properly.
    How can I fix this?



  • When you compare two files, vertical synchronization cannot be disabled.
    You must first stop the file comparison.



  • It used to, and it worked great when comparing Modify Java and Basis Source Code, up until this latest Update.
    So I guess I need to uninstall and revert back several Versions and look for an alternative. At least I didn’t update it on my
    Laptop, and the Laptop one still works.



  • @Jeff-Miller said:

    It used to, and it worked great

    This sounds like a bug. If a previous version had something that worked a particular way and the new one has removed that feature I’d call it a bug. That is UNLESS the old version was the bug and it was fixed in the later version.

    As a suggestion look at https://github.com/notepad-plus-plus/notepad-plus-plus/issues
    to see if anything had been raised on this issue. Maybe you could list it as a bug, at least you might get a response.

    Terry



  • @Jeff-Miller,
    @andrecool-68 is right - you cannot (at least should not be able to) turn off vertical scrolling in Compare v2. At least that’s what I recall.



  • It definitely worked in Prior Versions.
    i was able to Uninstall the 7.6.6 which is problematic.
    After the “Uninstall”, you then must manually delete its Home Directory under “Programs…”. Go into all of the "Users/<login_name>/AppData and delete all references to notepad++. Then go into Registry Edit and remove all references to Notepad++. Then Reboot and reinstall an earlier version. Looks like Compare v 2.0 is the culprit. So be sure to also download an earlier version of that Plugin.
    At any rate I have alerted all of my Contacts that use Notepad++, to not do any additional Updates, since this now appears to be permanently broken, at least for its usability is concerned, in our projects.
    It looks like most people commenting here, like its new feature. This reminds me of the old
    https://www.businessballs.com/amusement-stress-relief/tree-swing-cartoons-new-versions/ and the Swing Construction.
    We also use KDIFF, Tortoisgit, and Beyond Compare, any others I should look at to replace the Notepad++ Functionality that we lost?



  • @Jeff-Miller,

    Notepad++ has nothing to do with Compare vertical scroll sync.
    In Compare v2 you cannot disable vertical scroll sync.
    In Compare versions prior to v2 you can do that.



  • So is there something that works similar to the Compare prior to Version 2 that can be used as a Plugin, or do we consider this effectively end of life for the Product, if you need to use the old Compare Plugin?



  • @Jeff-Miller,

    There are plenty of solutions for you.

    1. Use old version of Notepad++ and old version of Compare Plugin
    2. Use new version of Notepad++ and manually install old version of Compare Plugin. (This might not work if you’re using 64-bit Notepad++… I don’t know if the old version of Compare Plugin had 64-bit version.)
    3. Use different software.
      • If you’ve already got TortoiseGit or TortoiseSVN, it’s diff utility is pretty good
      • I know that gvimdiff perpetually gets me out of sync in the two windows that I’m comparing, especially when I don’t want it to, so I assume that one could eventually learn how to keep it in sync when desired, and break the sync when desired.
    4. Put in a feature request on the Compare Plugin Issues Page – since @pnedev is the lead over there, he actually already knows you want that feature. You might want to talk nice to him here before doing that. I bet if you were to kindly and politely request the feature, and explain a use case for wanting to be able to temporarily break the sync, he would either take it under consideration as a feature for a future release, or be willing to explain the technical reasons .

    -----

    Personally, @pnedev, I can see a use case for breaking the sync. There are times, especially with a lot of changes between files, that the “real” lines it should be comparing are quite a ways down the document from where the diff thinks the comparison should be; often by breaking the sync and scrolling down, I am able to line things back up in my mind, and figure out how to do the edits (even if just inserting blank lines in one side or the other of the compare). I tried to come up with a short example of two files that would do it, but it wouldn’t show the issue… I run across that in the linux world a lot (and my gvimdiff hyperbole is exaggerated from my real-world experience of accidentally breaking the link when I want it synced, and having trouble breaking the link when I want to peak ahead on one side or the other.) Is there a technical reason that the vertical scroll sync was made fixed for v2, or had you/the-others just not thought of a use case for non-synced diff?



  • Thanks for the Suggestion.
    Use Case for How we have been using the Compare Function.
    In the product we support we use the Compare Function to Customize the ERP Package, to a specific Customer’s needs.
    The Source Code is Based upon java.
    Event Driven Actions called “Stanza’s” which are represented as sections that begin with
    [[MODULE.ACTION]]
    This comes out of a Rapid Development System which then compiles this into a more concise form that ends up being executed in Java.
    What we do not have control of is the specific presence or lack of an action, but within specific subsections we may do a lot of Cutting and Pasting.
    The two Attached files are the same Program Source. One in its original un-modified form, and the other in a modified form for a customer.
    Areas of Differences within a Stanza may be more than 30 Lines, but it is a case of simply not
    using them in one version, but comparing only those parts that are similar to fix things, then doing Cut and Paste to merge things within a Stanza.
    This has been easy to do by doing the Compare.
    Breaking the Sync.
    Aligning on a Stanza Declaration.
    Then re-establishing the Vertical Sync at that point.
    The Entire File itself is not the object of our Edits, rather the sub-sections within.

    I am not sure how to directly Attach Code Samples.
    Original Version:

    [[OPE_ORDHDR.ADIS]]
    rem --- Check for void
    
    if callpoint!.getColumnData("OPE_ORDHDR.INVOICE_TYPE")="V" then
       msg_id$="OP_ORDINV_VOID"
       gosub disp_message
       callpoint!.setStatus("NEWREC")
       break
       rem --- exit from callpoint
    endif
    
    rem --- Check for invoice
    
    if callpoint!.getColumnData("OPE_ORDHDR.ORDINV_FLAG")="I" then
       msg_id$="OP_IS_INVOICE"
       gosub disp_message
       callpoint!.setStatus("NEWREC")
       break
       rem --- exit from callpoint
    endif
    
    rem --- Check locked status
    
    gosub check_lock_flag
    
    if locked=1 then
       user_tpl.do_end_of_form=0
    
       callpoint!.setStatus("NEWREC")
       break
       rem --- exit callpoint
    endif
    
    rem --- Reprint order?
    
    if callpoint!.getColumnData("OPE_ORDHDR.REPRINT_FLAG")<>"Y" then
       cust_id$=callpoint!.getColumnData("OPE_ORDHDR.CUSTOMER_ID")
       order_no$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO")
       ar_type$=callpoint!.getColumnData("OPE_ORDHDR.AR_TYPE")
       reprint=0
       gosub check_if_reprintable
    else
       callpoint!.setDevObject("reprintable",1)
    endif
    
    rem --- Show customer data
    
    cust_id$=callpoint!.getColumnData("OPE_ORDHDR.CUSTOMER_ID")
    order_no$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO")
    gosub display_customer
    gosub add_to_batch_print
    
    if callpoint!.getColumnData("OPE_ORDHDR.CASH_SALE")<>"Y" then
       gosub display_aging
       gosub check_credit
    endif
    
    gosub disp_cust_comments
    
    rem --- Display Ship to information
    
    ship_to_type$=callpoint!.getColumnData("OPE_ORDHDR.SHIPTO_TYPE")
    ship_to_no$=callpoint!.getColumnData("OPE_ORDHDR.SHIPTO_NO")
    order_no$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO")
    gosub ship_to_info
    
    rem --- Set comm percent (if calling up a B/O, it will have been cleared);rem bug 8001
    
    slsp$=callpoint!.getColumnData("OPE_ORDHDR.SLSPSN_CODE")
    gosub get_comm_percent
    
    rem --- Enable buttons
    
    callpoint!.setOptionEnabled("PRNT",1)
    callpoint!.setOptionEnabled("RPRT",num(callpoint!.getDevObject("reprintable")))
    callpoint!.setOptionEnabled("TTLS",1)
    callpoint!.setOptionEnabled("SHPT",1)
    
    
    rem --- Set all previous values
    
    user_tpl.prev_ext_cost=num(callpoint!.getColumnData("OPE_ORDHDR.TOTAL_COST"))
    user_tpl.prev_disc_code$=callpoint!.getColumnData("OPE_ORDHDR.DISC_CODE")
    user_tpl.prev_ship_to$=callpoint!.getColumnData("OPE_ORDHDR.SHIPTO_NO")
    user_tpl.prev_sales_total=num(callpoint!.getColumnData("OPE_ORDHDR.TOTAL_SALES"))
    
    rem --- Set codes and flags
    
    user_tpl.price_code$=callpoint!.getColumnData("OPE_ORDHDR.PRICE_CODE")
    user_tpl.pricing_code$=callpoint!.getColumnData("OPE_ORDHDR.PRICING_CODE")
    user_tpl.order_date$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_DATE")
    user_tpl.disc_code$=callpoint!.getColumnData("OPE_ORDHDR.DISC_CODE")
    user_tpl.new_order=0
    user_tpl.record_deleted=0
    
    rem --- Set OrderHelper object fields
    
    ordHelp!=cast(OrderHelper, callpoint!.getDevObject("order_helper_object"))
    ordHelp!.setCust_id(callpoint!.getColumnData("OPE_ORDHDR.CUSTOMER_ID"))
    ordHelp!.setOrder_no(callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO"))
    ordHelp!.setInv_type(callpoint!.getColumnData("OPE_ORDHDR.INVOICE_TYPE"))
    ordHelp!.setTaxCode(callpoint!.getColumnData("OPE_ORDHDR.TAX_CODE"))
    print "---OrderHelper object fields set"
    rem debug
    
    rem --- Clear availability
    
    gosub clear_avail
    
    rem --- Capture current totals so we can tell later if they were changed in the grid
    
    callpoint!.setDevObject("initial_rec_data$",rec_data$)
    callpoint!.setDevObject("discount_amt",callpoint!.getColumnData("OPE_ORDHDR.DISCOUNT_AMT"))
    callpoint!.setDevObject("freight_amt",callpoint!.getColumnData("OPE_ORDHDR.FREIGHT_AMT"))
    callpoint!.setDevObject("tax_amount",callpoint!.getColumnData("OPE_ORDHDR.TAX_AMOUNT"))
    callpoint!.setDevObject("taxable_amt",callpoint!.getColumnData("OPE_ORDHDR.TAXABLE_AMT"))
    callpoint!.setDevObject("total_cost",callpoint!.getColumnData("OPE_ORDHDR.TOTAL_COST"))
    callpoint!.setDevObject("total_sales",callpoint!.getColumnData("OPE_ORDHDR.TOTAL_SALES"))
    
    rem --- Fix bad records with missing ordinv_flag
    
    if cvs(callpoint!.getColumnData("OPE_ORDHDR.ORDINV_FLAG"),2)="" then
       callpoint!.setColumnData("OPE_ORDHDR.ORDINV_FLAG","O")
       callpoint!.setStatus("SAVE")
    endif
    
    rem --- Create soCreateWO! instance if needed
    
    op_create_wo$=callpoint!.getDevObject("op_create_wo")
    if op_create_wo$="A" then
       rem --- Clean up previous instance as necessary
       if soCreateWO!<>null() then
          soCreateWO!.close()
       endif
       
       customer_id$=callpoint!.getColumnData("OPE_ORDHDR.CUSTOMER_ID")
       order_no$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO")
       soCreateWO!=new SalesOrderCreateWO(firm_id$,customer_id$,order_no$)
       
       rem --- Initialize soCreateWO! only if order NOT on Credit Hold and NOT a Quote
       if callpoint!.getColumnData("OPE_ORDHDR.CREDIT_FLAG")<>"C" and  callpoint!.getColumnData("OPE_ORDHDR.INVOICE_TYPE")<>"P" then
          soCreateWO!.initIsnWOMap(GridVect!.getItem(0))
          if soCreateWO!.woCount() then
             callpoint!.setOptionEnabled("WOLN",1)
          else
             callpoint!.setOptionEnabled("WOLN",0)
          endif
          
          rem --- If order was created via Duplicate Invoice, then create all possible Work Orders.
          if user_tpl.hist_ord$="Y" and callpoint!.getColumnData("OPE_ORDHDR.INVOICE_TYPE")<>"P" then
             soCreateWO!.setCreateWO(Boolean.valueOf("true"))
             user_tpl.hist_ord$=""
          endif
       endif
       
       callpoint!.setDevObject("soCreateWO",soCreateWO!)
       callpoint!.setDevObject("createWOs_status","")
    endif
    
    rem --- Disable Ship To fields
    
    ship_to_type$=callpoint!.getColumnData("OPE_ORDHDR.SHIPTO_TYPE")
    gosub disable_shipto
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Customized Version
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [[OPE_ORDHDR.ADIS]]
    rem --- Check for void
    
    if callpoint!.getColumnData("OPE_ORDHDR.INVOICE_TYPE")="V" then
       msg_id$="OP_ORDINV_VOID"
       gosub disp_message
       callpoint!.setStatus("NEWREC")
       break
       rem --- exit from callpoint
    endif
    
    rem --- Check for invoice
    
    if callpoint!.getColumnData("OPE_ORDHDR.ORDINV_FLAG")="I" then
       msg_id$="OP_IS_INVOICE"
       gosub disp_message
       callpoint!.setStatus("NEWREC")
       break
       rem --- exit from callpoint
    endif
    
    rem --- Check EDI Flags
    if callpoint!.getColumnData("OPE_ORDHDR.EDI_ORIGINATED")="Y" then
       dim msg_tokens$[6]
       msg_id$="OP_EDI_PROGRESS"
       msg_ix=0
       rem "Only Warn Once"
       if  callpoint!.getColumnData("OPE_ORDHDR.EDI_REQPO_MISS")="Y" and callpoint!.getDevObject("op_po_warn")="yes" then
          msg_tokens$[msg_ix]="This Customer Requires a PO but not Specified in this Order"
          msg_ix=msg_ix+1
          callpoint!.setDevObject("op_po_warn","no")
       endif
       if callpoint!.getColumnData("OPE_ORDHDR.EDI_DUPLICATED_P")="Y" then
          msg_tokens$[msg_ix]="This Customer has a Duplicate PO Specified in this Order"
          msg_ix=msg_ix+1
       endif
       if callpoint!.getColumnData("OPE_ORDHDR.EDI_SHIPTO_MIS")="Y" then
          msg_tokens$[msg_ix]="This Customer Requires a Ship  To but not Specified in this Order"
          msg_ix=msg_ix+1
       endif
       if callpoint!.getColumnData("OPE_ORDHDR.EDI_LINE_ERROR")="Y" then
          msg_tokens$[msg_ix]="A Line Item Exception Exists!"
          msg_ix=msg_ix+1
       endif
       if callpoint!.getColumnData("OPE_ORDHDR.EDI_TTL_ERROR")="Y" then
          msg_tokens$[msg_ix]="EDI Total Count doesn't Match Line Items"
          msg_ix=msg_ix+1
       endif
       if msg_ix>0 then
          gosub disp_message
          if pos("PASSVALID"=msg_opt$)<>0 then
             callpoint!.setColumnData("OPE_ORDHDR.EDI_REQPO_MISS","")
             callpoint!.setColumnData("OPE_ORDHDR.EDI_DUPLICATED_P","")
             callpoint!.setColumnData("OPE_ORDHDR.EDI_SHIPTO_MIS","")
             callpoint!.setColumnData("OPE_ORDHDR.EDI_LINE_ERROR","")
             callpoint!.setColumnData("OPE_ORDHDR.EDI_TTL_ERROR","")
             callpoint!.setStatus("MODIFIED")
          endif
       endif
    endif
    
    rem --- Check locked status
    
    gosub check_lock_flag
    
    if locked=1 then
       user_tpl.do_end_of_form=0
       callpoint!.clearStatus()
       callpoint!.setStatus("NEWREC")
       break
       rem --- exit callpoint
    endif
    
    rem --- Reprint order?
    
    if callpoint!.getColumnData("OPE_ORDHDR.REPRINT_FLAG")<>"Y" then
       cust_id$=callpoint!.getColumnData("OPE_ORDHDR.CUSTOMER_ID")
       order_no$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO")
       ar_type$=callpoint!.getColumnData("OPE_ORDHDR.AR_TYPE")
       reprint=0
       gosub check_if_reprintable
    else
       callpoint!.setDevObject("reprintable",1)
    endif
    
    rem --- Show customer data
    
    cust_id$=callpoint!.getColumnData("OPE_ORDHDR.CUSTOMER_ID")
    order_no$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO")
    gosub display_customer
    gosub add_to_batch_print
    
    if callpoint!.getColumnData("OPE_ORDHDR.CASH_SALE")<>"Y" then
       gosub display_aging
       gosub check_credit
    endif
    
    gosub disp_cust_comments
    
    rem --- Display Ship to information
    
    ship_to_type$=callpoint!.getColumnData("OPE_ORDHDR.SHIPTO_TYPE")
    ship_to_no$=callpoint!.getColumnData("OPE_ORDHDR.SHIPTO_NO")
    order_no$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO")
    gosub ship_to_info
    
    rem --- Set comm percent (if calling up a B/O, it will have been cleared);rem bug 8001 CAH
    
    slsp$=callpoint!.getColumnData("OPE_ORDHDR.SLSPSN_CODE")
    gosub get_comm_percent
    
    rem --- Enable buttons
    
    callpoint!.setOptionEnabled("PRNT",1)
    callpoint!.setOptionEnabled("RPRT",num(callpoint!.getDevObject("reprintable")))
    callpoint!.setOptionEnabled("TTLS",1)
    callpoint!.setOptionEnabled("SHPT",1)
    callpoint!.setOptionEnabled("BOLP",1)
    
    rem --- Set all previous values
    
    user_tpl.prev_ext_cost=num(callpoint!.getColumnData("OPE_ORDHDR.TOTAL_COST"))
    user_tpl.prev_disc_code$=callpoint!.getColumnData("OPE_ORDHDR.DISC_CODE")
    user_tpl.prev_ship_to$=callpoint!.getColumnData("OPE_ORDHDR.SHIPTO_NO")
    user_tpl.prev_sales_total=num(callpoint!.getColumnData("OPE_ORDHDR.TOTAL_SALES"))
    
    rem --- Set codes and flags
    
    user_tpl.price_code$=callpoint!.getColumnData("OPE_ORDHDR.PRICE_CODE")
    user_tpl.pricing_code$=callpoint!.getColumnData("OPE_ORDHDR.PRICING_CODE")
    user_tpl.order_date$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_DATE")
    user_tpl.disc_code$=callpoint!.getColumnData("OPE_ORDHDR.DISC_CODE")
    user_tpl.new_order=0
    user_tpl.record_deleted=0
    
    rem --- Set OrderHelper object fields
    
    ordHelp!=cast(OrderHelper, callpoint!.getDevObject("order_helper_object"))
    ordHelp!.setCust_id(callpoint!.getColumnData("OPE_ORDHDR.CUSTOMER_ID"))
    ordHelp!.setOrder_no(callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO"))
    ordHelp!.setInv_type(callpoint!.getColumnData("OPE_ORDHDR.INVOICE_TYPE"))
    ordHelp!.setTaxCode(callpoint!.getColumnData("OPE_ORDHDR.TAX_CODE"))
    print "---OrderHelper object fields set"
    rem debug
    
    rem --- Clear availability
    
    gosub clear_avail
    
    rem --- Capture current totals so we can tell later if they were changed in the grid
    
    callpoint!.setDevObject("initial_rec_data$",rec_data$)
    callpoint!.setDevObject("discount_amt",callpoint!.getColumnData("OPE_ORDHDR.DISCOUNT_AMT"))
    callpoint!.setDevObject("freight_amt",callpoint!.getColumnData("OPE_ORDHDR.FREIGHT_AMT"))
    callpoint!.setDevObject("tax_amount",callpoint!.getColumnData("OPE_ORDHDR.TAX_AMOUNT"))
    callpoint!.setDevObject("taxable_amt",callpoint!.getColumnData("OPE_ORDHDR.TAXABLE_AMT"))
    callpoint!.setDevObject("total_cost",callpoint!.getColumnData("OPE_ORDHDR.TOTAL_COST"))
    callpoint!.setDevObject("total_sales",callpoint!.getColumnData("OPE_ORDHDR.TOTAL_SALES"))
    
    rem --- Fix bad records with missing ordinv_flag
    
    if cvs(callpoint!.getColumnData("OPE_ORDHDR.ORDINV_FLAG"),2)="" then
       callpoint!.setColumnData("OPE_ORDHDR.ORDINV_FLAG","O",1)
       callpoint!.setStatus("SAVE-FLUSHOFF")
    endif
    
    rem --- Create soCreateWO! instance if needed
    
    op_create_wo$=callpoint!.getDevObject("op_create_wo")
    if op_create_wo$="A" then
       rem --- Clean up previous instance as necessary
       if soCreateWO!<>null() then
          soCreateWO!.close()
       endif
       
       customer_id$=callpoint!.getColumnData("OPE_ORDHDR.CUSTOMER_ID")
       order_no$=callpoint!.getColumnData("OPE_ORDHDR.ORDER_NO")
       soCreateWO!=new SalesOrderCreateWO(firm_id$,customer_id$,order_no$)
       
       rem --- Initialize soCreateWO! only if order NOT on Credit Hold and NOT a Quote
       if callpoint!.getColumnData("OPE_ORDHDR.CREDIT_FLAG")<>"C" and  callpoint!.getColumnData("OPE_ORDHDR.INVOICE_TYPE")<>"P" then
          soCreateWO!.initIsnWOMap(GridVect!.getItem(0))
          if soCreateWO!.woCount() then
             callpoint!.setOptionEnabled("WOLN",1)
          else
             callpoint!.setOptionEnabled("WOLN",0)
          endif
          
          rem --- If order was created via Duplicate Invoice, then create all possible Work Orders.
          if user_tpl.hist_ord$="Y" and callpoint!.getColumnData("OPE_ORDHDR.INVOICE_TYPE")<>"P" then
             soCreateWO!.setCreateWO(Boolean.valueOf("true"))
             user_tpl.hist_ord$=""
          endif
       endif
       
       callpoint!.setDevObject("soCreateWO",soCreateWO!)
       callpoint!.setDevObject("createWOs_status","")
    endif
    
    rem --- Disable Ship To fields
    
    ship_to_type$=callpoint!.getColumnData("OPE_ORDHDR.SHIPTO_TYPE")
    gosub disable_shipto
    
    rem --- Enable EDI Transcript of Data Present
    edi_text$=cvs(callpoint!.getColumnData("OPE_ORDHDR.EDI_TRANS_TEXT"),3)
    if edi_text$>"" then
       callpoint!.setOptionEnabled("EDI",1)
    else
       callpoint!.setOptionEnabled("EDI",0)
    endif
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    The Full Program in the original version is 3,469 Lines and the Modified Version i 5,384 Lines.
    
    I will post a Zip file containing both Sources up on DropBox and send a link to anyone interested.


  • @PeterJones ,

    or had you/the-others just not thought of a use case for non-synced diff?

    Yes, I didn’t come-up with such use case.
    Strictly speaking it is not exactly a “compare” function. Compare finds similarities and differences and aligns them. Manual alignment can be done simply if you put each file in a separate view without comparing them. I agree however that it might be useful addition.

    @Jeff-Miller,

    I didn’t get your thorough description but I have two questions:

    Then re-establishing the Vertical Sync at that point.

    1. Does that sentence mean that you would like to establish vertical sync but manually (at place of your liking) instead of just disabling vertical sync completely?

    The Entire File itself is not the object of our Edits, rather the sub-sections within.

    1. Does the last sentence mean that you would like to compare sub-sections of the files instead of disabling the vertical scroll sync? (The current development version of Compare already has such function)


  • Usually I Open Both files. Click on Compare, which automatically turns on all the Syncing.
    Scroll Down to the header of a Stanza that I am working on, which typically no longer aligns with the other Screen.
    Turn off Vertical Sync. Search to the Same “Header” and manually realign them. Then Turn Vertical Sync back on.
    So the answer is the ability to toggle the Sync on and off manually, but the initial Automatic On is fine.
    Likewise I sometimes toggle off Horizontal Sync to compare long lines with Word Wrap Toggled Off, but this is usually to
    find Fat Finger Typing on my part.

    Something I didn’t touch upon, is that the two files being compared may not necessarily have the Stanza’s in the Same Order.
    It is amazing at how well the Compare can find these and mark them up accordingly, then the ability to turn off the Vertical Sync.
    Manually Align them, and then turn the Vertical Sync back on, works great.

    I do have the full version of those two files zipped up, if you would like to evaluate. I wasn’t sure how to attach them here, or an email address to send a Dropbox Share to.

    I don’t know how you would implement the sub-section of a file concept with what I am dealing with. My examples show a single
    generated Program, but a lot of times there are parallel program constructs. Like an Order Entry versus an Invoice Entry screen both dealing with Line Item Details. The Module Name in my Example of [[MODULE.ACTION]] might be different, but the Action part would be similar, which requires human interaction. This is where KDIFF and Tortois Git start running into problems, because it tries to help, and the simple Merge Left or Right starts to fall apart.

    For Example
    [[OPE_ORDHDR.ADIS]]
    rem — Check for void
    if callpoint!.getColumnData(“OPE_ORDHDR.INVOICE_TYPE”)=“V” then
    msg_id$=“OP_ORDINV_VOID”
    gosub disp_message
    callpoint!.setStatus(“NEWREC”)
    break
    rem — exit from callpoint
    endif

    Would be getting compared to
    [[OPE_INVHDR.ADIS]]
    rem — Check for void
    if callpoint!.getColumnData(“OPE_INVHDR.INVOICE_TYPE”)=“V” then
    msg_id$=“OP_ORDINV_VOID”
    gosub disp_message
    callpoint!.setStatus(“NEWREC”)
    break
    rem — exit from callpoint
    endif

    Which are essentially the same pieces of code in different sections of the Application, but not in the same file.

    Many thanks for looking at this issue.



  • @pnedev said:

    Strictly speaking it is not exactly a “compare” function. Compare finds similarities and differences and aligns them.

    But no diff algorithm is perfect. There are times when I just insert code between, so a “perfect” diff/compare should show lines matching, then lines inserted, then lines matching again… but often, depending on how complicated the insert was, it will find enough common characters that it shows lines matching, then lines drastically changed and lines deleted, then a whole bunch of lines inserted.

    Here’s one that kindof shows the issue:

    Original

    SomeGroup(param1, param2)
    SomeGroup(param3, param3)
    SomeGroup(param4, param4)
    SomeGroup(param5, param5)
    SomeGroup(param6, param6)
    
    SomeGroup(param1b, param2)
    SomeGroup(param3b, param3b)
    SomeGroup(param4b, param4)
    SomeGroup(param5b, param5b)
    SomeGroup(param6b, param6)
    

    I will call those two groups of lines A and B. If I now insert a group C between those two, which is similar but not identical to B, and then edit B also, so it looks like:

    Inserted and edited B

    SomeGroup(param1, param2)
    SomeGroup(param3, param3)
    SomeGroup(param4, param4)
    SomeGroup(param5, param5)
    SomeGroup(param6, param6)
    
    SomeGroup(param1b, param2)
    SomeGroup(param3, param3b)
    SomeGroup(param4b, param4)
    SomeGroup(param5, param5b)
    SomeGroup(param6, param6)
    
    SomeGroup(param1b, param2)
    SomeGroup(param3, param3b)
    SomeGroup(param4b, param4)
    SomeGroup(param5, param5b)
    SomeGroup(param6, param6)
    

    I’d really like it to show the 5 inserted lines of code and blank line (section C), and the changes in the group B… but insteead, it shows inserts/changes interleaved rather than a group of inserts followed by a group of edits.

    This is exacerbated by the blocks being longer…

    I understand that’s a deficiency in any diff algorithm, and not something you can fix. But I would solve it by

    Now assume it’s a page or two in each block, and t

    When I run across a situation like that, I break the sync to scroll down on the “longer” side until I see the block that I knew was originally “B”, while still looking at the top of where “C” went; I then start adding blank (or comment) lines to the “left” file, refreshing the comparison frequently, and watch the “C” highlights on the LEFT, and watch the “B” hightlights on the RIGHT – waiting until both the “C” group and “B” group show up as the diff I want, vs the default diff.

    It would make more sense with longer blocks, and being able to show you how I have things scrolled… but this is proof of concept.

    I did 5sec pauses on the first/wrong compare, and the final/right compare. And if that’s not long enough, here are the two compares alone:

    To sum up: at every step along the way, I am comparing… I am just doing edits/scrolls, so I want to watch different segments of the compare, depending on whether I’m on the LEFT or the RIGHT – but I still want to see what portions on the LEFT the diff/compare thinks are changed and what portions on the RIGHT the diff/compare thinks are changed.



  • Actually both the “This is NOT the diff I want to see” and “This is really the diff I want to see” work for me, as long as I can
    toggle off the Sync. Manually reposition the beginning of the Comparison point displayed and then turn the sync back on.

    More often then not, I am looking for similarities in Logic between two sections for the place to insert several lines of code that had been used for another client. An exact Diff would usually not match because bits and pieces might have different names. It would be sort of like I am looking for the Lines in Green on the Right that Do not appear at all in the Lines on Left in relatively the same logic blocks. Conversely looking for the Lines in Red on the Left that Do Not appear at all in the lines on the Right, that were probably deleted and Superseded.

    Then directly editing and Saving.

    Usually after doing one of these Edits, that Source File is then passed through a Parser that performs the Syntax Checking and compiles it into closer to its final form. Then additionally running it through Git to further document changes and the features it brings to the table.

    Then when there is a System Wide Update of the Original Base Code, run Kdiff3 against the entire before and after directories. Most Cases using the Kdiff3 functions to deal with slight alterations, then resorting to launching the Before and After files to Notepad++ where the human element must come into play.

    The other Notepad++ tool I make heavy use of is “Search - Find” and “Search - Find in Files”.
    A field may have changed names in a Table and all of the Code has to be Adjusted, or a File/Path name is directly referenced in the Text and has to be relocated to its new File/Path name throughout the subsystem.

    The Actual Applications run in Windows/Mac/Linux and are primarily Linux Based, but the GUI Interface from Tortoise Git, KDiff3, and Notepad++ are the Tools primarily used in development.



  • Hello @Jeff-Miller and @Peter-Jones,

    Sorry for the late reply guys.

    Jeff,

    Manually Align them, and then turn the Vertical Sync back on, works great.

    Turning vertical sync back on will NOT do re-compare from your new alignment point. So you are visually “comparing” the stanzas yourself, correct?

    Peter,

    But no diff algorithm is perfect …

    I know what you are talking about.
    I remember the times when I was using BeyondCompare extensively and there were cases when I used to set manual sync points. Those were triggering re-comparison from the points set forward.

    I am much or less close to releasing a new compare plugin based on the current Compare but with lots of additions, extensions and fixes.
    Here are the x86 and x64 versions of my development build for you to try.
    Please manually delete your current ComparePlugin.ini config file and manually replace your ComparePlugin.dll with the new one.

    The new version doesn’t have the possibility to turn off and then back on the vertical sync (it actually does the vertical sync itself without relying on Notepad++ because of the complicated alignment) but it has another function that might be what you are looking for.
    It is called Compare Selections and what it does is simply comparing only the selected lines portion of the two files.
    So your use case might look like this:

    1. Compare the whole files.
    2. When you find your “stanza” or manual compare point select the lines after it in both files (or only the lines of the stanzas you want compared) and do Compare Selections.

    Tell me if it works for you.
    Any other feedback is appreciated as well.

    BR



  • Hello @pnedev
    This version of the plugin works without freezes, unlike “ComparePlus”!



  • @pnedev
    The old version of ComparePlugin 2.0 still runs faster than ComparePlugin 3.0



  • @andrecool-68

    This version of the plugin works without freezes, unlike “ComparePlus”!

    i can still reproduce the freeze you discovered, when comparing english.xml with russian.xml using the new ComparePlugin.dll from above, same as ComparePlus, but maybe a few seconds faster.

    the freeze happens for me, when reaching about the middle of the progress bar, close to the cancel button.
    after the freeze, the progress bar jumps right to the end.

    does it run fast for you now ?

    @pnedev

    many thanks.
    as i can see this build is called Compare again, and not ComparePlus.

    will you make two separately developed projects, or is it just temporary, and everything above 2.0 will be called ComparePlus ?

    big thanks, your work is very appreciated. 👍
    best regards.



  • @Meta-Chuh
    Here is a comparison ComparePlugin 2.0 ComparePlugin 3.0 and builds the latest version of ComparePlus
    The first version of the ComparePlus plugin generally hung for 2 minutes (this project was not preserved)

    Imgur

    Imgur

    Imgur



  • @pnedev said:

    Compare Selections. Tell me if it works for you.

    Oh, that’s just awesome. I will now be taking the effort to do my compares using this plugin via samba shares, rather than living with the outdated diff tools on the linux box, a lot more often than I used to.

    Thank you.


Log in to reply