No announcement yet.

How does Ignore Trailing Whitespace and Line Endings work?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How does Ignore Trailing Whitespace and Line Endings work?

    I have two files, one with PC line endings, the other with "Mix".

    In one of the files, there is no trailing whitespace on anything, in the other a ton of lines have it.

    I can find no setting that ignores the trailing whitespace.

    I have "Ignore unimportant differences" checked.

    In the sessions dialog, Importance tab, I have tried checking and unchecking "Trailing Whitespace" under "Default" section.

    I have also checked and unchecked "Compare line endings (PC/Mac/Unix)" but no combo of these causes the line to be ignored.

    When I click on such a line, the trailing whitespaces are represented in the line at the bottom as dots, and the dots are red, suggesting it "counts" as an important difference?

    This happens regardless if there is one space or dozens, as this varies per line.

    The file with "Mix" line endings has the extra whitespace, the PC line endings (the desired style) does not (also desired.)

    I'm less concerned about the line endings themselves or the extra ending space than that it clogs up a diff that will have many dozens of differences not counting the whitespace on the ends of lines.

  • #2

    My hunch is that the whitespace might be part of another grammar definition (such as Comments).

    The expected result is to uncheck Trailing Whitespace in the Session Settings, Importance tab. Unchecked items are unimportant (blue) differences. If you then toggle on Ignore Unimportant Differences, blue changes become equal/black, and are treated as if equal/same text.

    If Trailing whitepsace is unchecked, but the space characters still show as Red, then they might be swallowed by another grammar definition that is matching on them. If you click into the whitespace, the bottom status bar will report the detected grammar element the blinking cursor is within (default text, or a specific name). Which name is shown here?

    If you are still having trouble, could you post or email in a full screen screenshot? If emailing, please also include your from the Help menu -> Support dialog; Export, and a pair of sample files, and a link back to this forum thread for our reference.
    Aaron P Scooter Software