Clipboard Compare
Clipboard Compare exists for the text you have in your hand rather than on disk: two versions of a function pasted out of the IDE, a snippet from an e-mail against the code in front of you, two blocks of DataWindow syntax from a forum post. Paste one on each side and compare.
It is the Line Compare tab with the clipboard wired to it, so it reads the same way: the two versions stacked, the runs that differ shaded, and the text coloured for whichever language the selector names.
Using it
- Choose Compare ▸ Clipboard Compare. It opens as a tab, empty.
- Copy the older text and choose Paste Old; copy the newer text and choose Paste New. Both boxes are ordinary editable text, so you can also type or correct the content.
- Choose Compare.
The engine and language selectors, those two paste commands, Compare and Swap are what this tab puts in the application's tool bar. Each of the four commands shows its name beside its icon, and its tool tip says what it does. The tab below holds the two boxes and the result, and nothing else.
The comparison runs by itself once both sides hold something, and F5 runs it again. Compare ▸ Clipboard Compare on the menu opens another empty pad rather than acting on the one in front, so two pairs of fragments can sit side by side in two tabs.
Reading the result
The result is the same stacked display Line Compare uses: the old text above the new, aligned at the same left edge, with the runs that changed shaded and a marker beside each pair.
Engine and language
The two drop-down lists in the tool bar are the same two Line Compare carries, and they mean the same things: the first chooses whether a line is broken into tokens or into characters before the two sides are compared, the second chooses the language whose lexer does the breaking and the colouring.
A pad opens on Plain text, because what arrives on a clipboard is not reliably PowerScript. Paste two versions of a function or two blocks of DataWindow syntax and set the language to match: the result is then lexed and coloured like any other compare pane, and the in-line differences fall on token boundaries instead of on characters.
The same text-compare options apply as everywhere else, Ignore whitespace and the Resync distance threshold in particular.
What it does not do
Clipboard Compare runs the text diff engine. It does not parse the
pasted content into an object hierarchy, because a fragment of a
function is not an object: there is no export header to identify it and
no guarantee that what you pasted is complete. If you want the parsed,
section-by-section compare, save the two versions as .sr*
files and open a File Compare.
Nothing is saved. Closing the tab discards the text.