How to show same text as not-different

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joecar
    Fanatic
    • Apr 2015
    • 101

    How to show same text as not-different

    In attached pic:

    left side has an if statement around some text (a function call)...

    on right side has same text (the function call) without the surrounding if...

    how do I get the common text to not be highlighted (or colored) as different...?

    Thanks


    ( I couldn't think of a better title that was sufficiently terse )
    Attached Files
  • lhasadad
    Expert
    • Apr 2008
    • 68

    #2
    For you text compare settings do you have leading white space checked. if so try unchecking and retrying the comparison.

    Comment

    • Aaron
      Team Scooter
      • Oct 2007
      • 16007

      #3
      Hello,

      If you click the cursor next to the text (not highlight, but just click), we will show the detected grammar element name in the bottom status bar. In your screenshot, they both show as Identifier based on where your cursor currently is, but if you move it to the different area, I expect we'll see a change.

      Different grammars will be considered a difference, even if the text values are the same. Such as "String" vs String. Depending on the detected grammar types, this may have an impact on your comparison.
      Aaron P Scooter Software

      Comment

      • joecar
        Fanatic
        • Apr 2015
        • 101

        #4
        Originally posted by lhasadad
        For you text compare settings do you have leading white space checked. if so try unchecking and retrying the comparison.
        Yes, I tried that already.

        Comment

        • joecar
          Fanatic
          • Apr 2015
          • 101

          #5
          Originally posted by Aaron
          Hello,

          If you click the cursor next to the text (not highlight, but just click), we will show the detected grammar element name in the bottom status bar. In your screenshot, they both show as Identifier based on where your cursor currently is, but if you move it to the different area, I expect we'll see a change.

          Different grammars will be considered a difference, even if the text values are the same. Such as "String" vs String. Depending on the detected grammar types, this may have an impact on your comparison.
          Hmmm, so I'll set the Format to Everything Else and then see what it shows...

          Comment

          • joecar
            Fanatic
            • Apr 2015
            • 101

            #6
            Originally posted by joecar
            Hmmm, so I'll set the Format to Everything Else and then see what it shows...
            Yep that works, see attached pic...

            so now I'm pondering what are the implications of this...
            Attached Files

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 16007

              #7
              Everything Else defaults with no grammar definitions, so you would lose the ability to mark different grammars as different in the above scenario, where text is equal but different grammar types (Comments, Strings, etc). You would also lose Syntax coloring. Otherwise, using a File Format with no grammars will compare all text as "default text", and align line by line.
              Aaron P Scooter Software

              Comment

              • joecar
                Fanatic
                • Apr 2015
                • 101

                #8
                Ok, thanks for the explanation.

                Comment

                Working...